protected function generateSource() { $result = false; $this->mLayout = ($this->mComments ? '<!-- begin ' . $this->mName . ' submit -->' : '') . '<input' . (isset($this->mArgs['id']) ? ' id="' . $this->mArgs['id'] . '"' : '') . $this->getEventsCompleteString() . ' class="normal" type="submit"' . ($this->mArgs['caption'] ? ' value="' . \Innomatic\Wui\Wui::utf8_entities($this->mArgs['caption']) . '"' : '') . ' tabindex="' . $this->mArgs['tabindex'] . '"' . ((isset($this->mArgs['needconfirm']) and $this->mArgs['needconfirm'] == 'true') ? ' onclick="return confirm(\'' . $this->mArgs['confirmmessage'] . '\')"' : '') . ((isset($this->mArgs['hint']) and $this->mArgs['hint']) ? ' alt="' . $this->mArgs['hint'] . '"' : '') . '>' . ($this->mComments ? '<!-- end ' . $this->mName . " submit -->\n" : ''); $result = true; return $result; }
public function getHTML() { $locale_catalog = new \Innomatic\Locale\LocaleCatalog('innowork-core::misc', InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getCurrentUser()->getLanguage()); $theme = \Innomatic\Wui\Wui::instance('\\Innomatic\\Wui\\Wui')->getTheme(); $icon = $theme->mIconsBase . $theme->mIconsSet['light']['trash']['base'] . '/light/' . $theme->mIconsSet['light']['trash']['file']; return '<a href="' . \Innomatic\Wui\Dispatch\WuiEventsCall::buildEventsCallString('1innoworkcore', array(array('view', 'trashcan', ''))) . '" alt="' . $locale_catalog->getStr('trashcan.menu') . '"><img width="25" height="25" align="right" src="' . $icon . '" alt="' . $locale_catalog->getStr('trashcan.menu') . '" /></a>'; }
protected function generateSource() { $result = false; $event_data = new WuiEventRawData($this->mDisp, $this->mName); $this->mLayout = ($this->mComments ? "<!-- begin " . $this->mName . " push button -->" : "") . '<button' . (isset($this->mArgs['id']) ? ' id="' . $this->mArgs['id'] . '"' : '') . $this->getEventsCompleteString() . ' class="normal" ' . "name=\"" . $event_data->getDataString() . "\"" . (strlen($this->mValue) ? " value=\"" . \Innomatic\Wui\Wui::utf8_entities($this->mValue) . "\"" : "") . ' tabindex="' . $this->mTabIndex . '"' . (strlen($this->mType) ? " type=\"" . $this->mType . "\"" : "") . ($this->mNeedConfirm == 'true' ? ' onclick="return confirm(\'' . $this->mConfirmMessage . '\')"' : '') . ">" . $this->mLabel . (strlen($this->mImage) ? "<img src=\"" . $this->mImage . "\"" . (strlen($this->mHint) ? " alt=\"" . \Innomatic\Wui\Wui::utf8_entities($this->mHint) . "\"" : "") . ">" : "") . "</button>" . ($this->mComments ? "<!-- end " . $this->mName . " push button -->\n" : ""); $result = true; return $result; }
protected function generateSource() { $result = false; $event_data = new \Innomatic\Wui\Dispatch\WuiEventRawData($this->mDisp, $this->mName); $this->mLayout = ($this->mComments ? '<!-- begin ' . $this->mName . ' radio -->' : '') . '<table border="0" cellpadding="0" cellspacing="0"><tr><td valign="middle"><input' . (isset($this->mArgs['id']) ? ' id="' . $this->mArgs['id'] . '"' : '') . $this->getEventsCompleteString() . ' class="normal" ' . (strlen($this->mHint) ? 'onMouseOver="wuiHint(\'' . str_replace("'", "\\'", $this->mHint) . '\');" onMouseOut="wuiUnHint();" ' : '') . 'type="radio" ' . 'name="' . $event_data->getDataString() . '"' . (strlen($this->mValue) ? ' value="' . $this->mValue . '"' : '') . ' tabindex="' . $this->mTabIndex . '"' . (strlen($this->mReadOnly) ? ' disabled' : '') . ($this->mChecked == 'true' ? ' checked' : '') . '></td><td valign="middle">' . \Innomatic\Wui\Wui::utf8_entities($this->mLabel) . '</td></tr></table>' . ($this->mComments ? '<!-- end ' . $this->mName . " radio -->\n" : ''); $result = true; return $result; }
public function __construct(\Innomatic\Desktop\Panel\PanelController $controller) { $this->controller = $controller; // Deprecated $this->_controller = $controller; // Sets Wui container instance $this->wuiContainer = \Innomatic\Wui\Wui::instance('\\Innomatic\\Wui\\Wui'); // Deprecated $this->_wuiContainer = $this->wuiContainer; }
public function executesettheme($eventData) { $userCfg = new UserSettings(\Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getCurrentDomain()->getDataAccess(), \Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getCurrentUser()->getUserId()); $userCfg->setKey('wui-theme', $eventData['theme']); if (User::isAdminUser(\Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getCurrentUser()->getUserName(), \Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getCurrentDomain()->getDomainId())) { $domainCfg = new DomainSettings(\Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getCurrentDomain()->getDataAccess()); $domainCfg->EditKey('wui-theme', $eventData['theme']); } $wui = \Innomatic\Wui\Wui::instance('\\Innomatic\\Wui\\Wui'); $wui->setTheme($eventData['theme']); \Innomatic\Webapp\WebAppContainer::instance('\\Innomatic\\Webapp\\WebAppContainer')->getProcessor()->getResponse()->addHeader('Location', WuiEventsCall::buildEventsCallString('', array(array('view', 'default', ''), array('action', 'settheme2', '')))); }
protected function generateSource() { $result = false; if (isset($this->mArgs['elements']) and is_array($this->mArgs['elements']) and count($this->mArgs['elements'])) { $event_data = new \Innomatic\Wui\Dispatch\WuiEventRawData($this->mArgs['disp'], $this->mName); $this->mLayout = ($this->mComments ? '<!-- begin ' . $this->mName . " combobox -->\n" : '') . '<select' . (isset($this->mArgs['id']) ? ' id="' . $this->mArgs['id'] . '"' : '') . $this->getEventsCompleteString() . ' ' . ((isset($this->mArgs['hint']) and strlen($this->mArgs['hint'])) ? 'onMouseOver="wuiHint(\'' . str_replace("'", "\\'", $this->mArgs['hint']) . '\');" onMouseOut="wuiUnHint();" ' : '') . 'name="' . $event_data->getDataString() . "\"" . ' tabindex="' . $this->mArgs['tabindex'] . '"' . ">\n"; reset($this->mArgs['elements']); while (list($key, $val) = each($this->mArgs['elements'])) { $this->mLayout .= '<option value="' . $key . '"' . ((isset($this->mArgs['default']) and $this->mArgs['default'] == $key) ? ' selected' : '') . '>' . \Innomatic\Wui\Wui::utf8_entities($val) . "</option>\n"; } $this->mLayout .= $this->mComments ? "</select>\n<!-- end " . $this->mName . " combobox -->\n" : ''; $result = true; } return true; }
protected function generateSource() { $this->mLayout = $this->mComments ? '<!-- begin ' . $this->mName . ' statusbar -->' : ''; if (isset($this->mArgs['status']) and strlen($this->mArgs['status'])) { $this->mLayout .= '<table border="0" ' . (isset($this->mArgs['width']) ? 'width="' . $this->mArgs['width'] . '" ' : '') . ' cellspacing="0"' . ' cellpadding="3" bgcolor="' . $this->mThemeHandler->mColorsSet['statusbars']['bgcolor'] . "\">\n"; $this->mLayout .= "<tr>\n"; $this->mLayout .= '<td class="status" nowrap style="white-space: nowrap;' . ((isset($this->mArgs['color']) and strlen($this->mArgs['color'])) ? 'color:' . $this->mArgs['color'] . ';' : '') . '">' . ((isset($this->mArgs['status']) and strlen($this->mArgs['status'])) ? \Innomatic\Wui\Wui::utf8_entities($this->mArgs['status']) : ' ') . "</td>\n"; if ($this->mArgs['width'] == "100%") { $this->mLayout .= '<td width="100%"> </td>'; } $this->mLayout .= "</tr>\n"; $this->mLayout .= "</table>\n"; } $this->mLayout .= $this->mComments ? '<!-- end ' . $this->mName . " statusbar -->\n" : ''; return true; }
protected function generateSource() { if (is_array($this->mArgs['elements'])) { $event_data = new \Innomatic\Wui\Dispatch\WuiEventRawData(isset($this->mArgs['disp']) ? $this->mArgs['disp'] : '', $this->mName); $this->mLayout = ($this->mComments ? '<!-- begin ' . $this->mName . " listbox -->\n" : '') . '<select' . (isset($this->mArgs['id']) ? ' id="' . $this->mArgs['id'] . '"' : '') . $this->getEventsCompleteString() . ' ' . ((isset($this->mArgs['hint']) and strlen($this->mArgs['hint'])) ? 'onMouseOver="wuiHint(\'' . str_replace("'", "\\'", $this->mArgs['hint']) . '\');" onMouseOut="wuiUnHint();" ' : '') . 'name="' . $event_data->getDataString() . ((isset($this->mArgs['multiselect']) and $this->mArgs['multiselect'] == 'true') ? '[]' : '') . '" size="' . $this->mArgs['size'] . '"' . ((isset($this->mArgs['multiselect']) and $this->mArgs['multiselect'] == 'true') ? ' multiple' : '') . ' tabindex="' . $this->mArgs['tabindex'] . '"' . ">\n"; reset($this->mArgs['elements']); if (sizeof($this->mArgs['elements'])) { while (list($key, $val) = each($this->mArgs['elements'])) { $this->mLayout .= '<option value="' . $key . '"' . ((isset($this->mArgs['default']) and is_array($this->mArgs['default']) and in_array($key, $this->mArgs['default'])) ? ' selected' : '') . '>' . \Innomatic\Wui\Wui::utf8_entities($val) . "</option>\n"; } } else { $this->mLayout .= '<option value=""> </option>' . "\n"; } $this->mLayout .= "</select>\n" . ($this->mComments ? '<!-- end ' . $this->mName . " listbox -->\n" : ''); } return true; }
protected function generateSource() { $result = false; $event_data = new \Innomatic\Wui\Dispatch\WuiEventRawData(isset($this->mArgs['disp']) ? $this->mArgs['disp'] : '', $this->mName); $check_script = ''; if ((isset($this->mArgs['required']) and $this->mArgs['required'] == 'true') || (isset($this->mArgs['integer']) and $this->mArgs['integer'] == 'true') || (isset($this->mArgs['email']) and $this->mArgs['email'] == 'true')) { $check_script = ' <script language="JavaScript" type="text/javascript"> <!-- requiredFields[requiredFields.length] = new Array( "' . $event_data->getDataString() . '", "' . $this->mArgs['checkmessage'] . '"' . ($this->mArgs['required'] == 'true' ? ', "required"' : '') . ($this->mArgs['integer'] == 'true' ? ', "integer"' : '') . ($this->mArgs['email'] == 'true' ? ', "email"' : '') . ' ); --> </script>'; } $this->mLayout = ($this->mComments ? '<!-- begin ' . $this->mName . ' textarea -->' : '') . '<textarea' . (isset($this->mArgs['id']) ? ' id="' . $this->mArgs['id'] . '"' : '') . ' ' . (isset($this->mArgs['maxlength']) ? ' maxlength="' . $this->mArgs['maxlength'] . '"' : '') . ((isset($this->mArgs['hint']) and strlen($this->mArgs['hint'])) ? 'onMouseOver="wuiHint(\'' . str_replace("'", "\\'", $this->mArgs['hint']) . '\');" onMouseOut="wuiUnHint();" ' : '') . 'name="' . $event_data->getDataString() . '"' . (strlen($this->mArgs['rows']) ? ' rows="' . $this->mArgs['rows'] . '"' : '') . (strlen($this->mArgs['bgcolor']) ? ' STYLE="background-color: ' . $this->mArgs['bgcolor'] . ';"' : '') . (strlen($this->mArgs['cols']) ? ' cols="' . $this->mArgs['cols'] . '"' : '') . ' tabindex="' . $this->mArgs['tabindex'] . '"' . ((isset($this->mArgs['readonly']) and strlen($this->mArgs['readonly'])) ? ' readonly' : '') . '>' . ((isset($this->mArgs['value']) and strlen($this->mArgs['value'])) ? \Innomatic\Wui\Wui::utf8_entities($this->mArgs['value']) : '') . '</textarea>' . $check_script . ($this->mComments ? '<!-- end ' . $this->mName . " textarea -->\n" : ''); $result = true; return $result; }
public static function check_log(&$container) { $innomatic = \Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer'); if (!file_exists($innomatic->getHome() . 'core/log/innomatic.log')) { return; } $log_content = file_get_contents($innomatic->getHome() . 'core/log/innomatic.log'); $container->addChild(new WuiHorizBar('loghr')); $container->addChild(new WuiText("rootlog", array('disp' => 'action', "readonly" => "true", "value" => \Innomatic\Wui\Wui::utf8_entities($log_content), "rows" => "20", "cols" => "80")), 0, 1); @unlink($innomatic->getHome() . 'core/log/innomatic.log'); }
protected function generateSource() { $result = false; $event_data = new \Innomatic\Wui\Dispatch\WuiEventRawData($this->mDisp, $this->mName); $calendar_dateformat = str_replace('/', '\\/', $this->mLocaleCountryHandler->ShortDateFormat()); $calendar_dateformat = str_replace('d', 'DD', $calendar_dateformat); $calendar_dateformat = str_replace('m', 'MM', $calendar_dateformat); $calendar_dateformat = str_replace('y', 'YY', $calendar_dateformat); $calendar_dateformat = str_replace('Y', 'YYYY', $calendar_dateformat); $this->mLayout = ''; if ($this->mType == 'date') { $this->mLayout .= "<script language=\"JavaScript\">\n\nCalendar.Title = '" . $this->mLocaleHandler->getStr('calendar') . "';\nCalendar.TableGridColor = '" . $this->mThemeHandler->mColorsSet['tables']['gridcolor'] . "';\nCalendar.TableBgColor = '" . $this->mThemeHandler->mColorsSet['tables']['bgcolor'] . "';\nCalendar.TableHeaderBgColor = '" . $this->mThemeHandler->mColorsSet['tables']['headerbgcolor'] . "';\n\nCalendar.WeekDays = new Array( '" . $this->mLocaleHandler->getStr('mon') . "',\n '" . $this->mLocaleHandler->getStr('tue') . "',\n '" . $this->mLocaleHandler->getStr('wed') . "',\n '" . $this->mLocaleHandler->getStr('thu') . "',\n '" . $this->mLocaleHandler->getStr('fri') . "',\n '" . $this->mLocaleHandler->getStr('sat') . "',\n '" . $this->mLocaleHandler->getStr('sun') . "');\n\nCalendar.Months = new Array( '" . $this->mLocaleHandler->getStr('january') . "',\n '" . $this->mLocaleHandler->getStr('february') . "',\n '" . $this->mLocaleHandler->getStr('march') . "',\n '" . $this->mLocaleHandler->getStr('april') . "',\n '" . $this->mLocaleHandler->getStr('may') . "',\n '" . $this->mLocaleHandler->getStr('june') . "',\n '" . $this->mLocaleHandler->getStr('july') . "',\n '" . $this->mLocaleHandler->getStr('august') . "',\n '" . $this->mLocaleHandler->getStr('september') . "',\n '" . $this->mLocaleHandler->getStr('october') . "',\n '" . $this->mLocaleHandler->getStr('november') . "',\n '" . $this->mLocaleHandler->getStr('december') . "');\n</script>"; } $this->mLayout .= ($this->mComments ? '<!-- begin ' . $this->mName . ' date -->' : '') . '<span style="white-space: nowrap;"><input' . (isset($this->mArgs['id']) ? ' id="' . $this->mArgs['id'] . '"' : '') . $this->getEventsCompleteString() . ' class="normal" ' . (strlen($this->mHint) ? 'onMouseOver="wuiHint(\'' . str_replace("'", "\\'", $this->mHint) . '\');" onMouseOut="wuiUnHint();" ' : '') . 'type="text" name="' . $event_data->getDataString() . '"' . ' tabindex="' . $this->mTabIndex . '"' . (is_array($this->mValue) ? ' value="' . \Innomatic\Wui\Wui::utf8_entities($this->mType == 'date' ? $this->mLocaleCountryHandler->formatShortArrayDate($this->mValue) : $this->mLocaleCountryHandler->formatArrayTime($this->mValue)) . '"' : '') . ($this->mHint ? ' alt="' . $this->mHint . '"' : '') . (strlen($this->mSize) ? ' size="' . $this->mSize . '"' : '') . (strlen($this->mMaxLength) ? ' maxlength="' . $this->mMaxLength . '"' : '') . (strlen($this->mReadOnly) ? ' readonly' : '') . '>' . ($this->mReadOnly != 'true' ? $this->mType == 'date' ? " <a href=\"javascript:show_calendar( 'forms[' + GetFormNumber('" . $event_data->getDataString() . "') + '].elements[' + GetElementNumber('" . $event_data->getDataString() . "') + ']'," . (is_array($this->mValue) ? "'" . sprintf('%u', $this->mValue['mon'] - 1) . "','" . $this->mValue['year'] . "'" : 'null,null') . ",'" . $calendar_dateformat . "');\">" . '<img src="' . $this->mThemeHandler->mIconsBase . $this->mThemeHandler->mIconsSet['mini']['icons']['base'] . '/icons/' . $this->mThemeHandler->mIconsSet['icons']['calendar']['file'] . '" alt="" border="0" style="width: 16px; height: 16px;"></a>' : '' : '') . '</span>' . ($this->mComments ? '<!-- end ' . $this->mName . " string -->\n" : ''); return true; }
public function viewDefault($eventData) { $def_width = 380; $def_height = 250; $widgets = $this->getController()->getWidgetsList(); $widget_counter = 0; $columns = 3; $start_column = true; $end_column = false; $rows_per_column = floor(count($widgets) / $columns) + (count($widgets) % $columns > 0 ? 1 : 0); $wui_xml = '<horizgroup><children>'; foreach ($widgets as $widget) { $width = 0; $height = 0; $class = $widget['class']; // Check if the class exists if (class_exists($class, true)) { // Fetch the widget xml definition $widget_obj = new $class(); // Check if the widget is visible if (!$widget_obj->isVisible()) { continue; } $width = $widget_obj->getWidth() * $def_width; $height = $widget_obj->getHeight(); } else { continue; } // If this is the start of a column, add the vertical group opener if ($start_column) { $wui_xml .= '<vertgroup><children>'; $start_column = false; } // Add ajax setup call \Innomatic\Wui\Wui::instance('\\Innomatic\\Wui\\Wui')->registerAjaxSetupCall('xajax_GetDashboardWidget(\'' . $widget['name'] . '\')'); // Check width and height parameters if ($width == 0) { $width = $def_width; } if ($height == 0) { $height = $def_height; } // Widget title $widget_locale = new LocaleCatalog($widget['catalog'], $this->container->getCurrentUser()->getLanguage()); $headers = array(); $headers[0]['label'] = $widget_locale->getStr($widget['title']); // Draw the widget $wui_xml .= '<table halign="left" valign="top"><args><headers type="array">' . WuiXml::encode($headers) . '</headers></args><children><vertgroup row="0" col="0" halign="left" valign="top"><args><width>' . $width . '</width><height>' . $height . '</height><groupvalign>top</groupvalign></args><children><divframe><args><id>widget_' . $widget['name'] . '</id><width>300</width></args><children><void/></children></divframe></children></vertgroup></children></table>'; $widget_counter++; // Check if this last widget for each column if ($widget_counter % $rows_per_column == 0) { $end_column = true; } // If this is the last widget, end the column anyway if ($widget_counter == count($widgets)) { $end_column = true; } // If this the end of a column, close the vertical group if ($end_column) { $wui_xml .= '</children></vertgroup>'; $start_column = true; $end_column = false; } } $wui_xml .= '</children></horizgroup>'; $this->wuiMainframe->addChild(new WuiXml('', array('definition' => $wui_xml))); }
protected function generateSourceEnd() { $container = \Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer'); // Add titlebar $this->mLayout = str_replace('{[wui-titlebar-title]}', isset($GLOBALS['wui']['titlebar-title']) ? $GLOBALS['wui']['titlebar-title'] : '', $this->mLayout); // Extract toolbars $string = ''; preg_match_all("/<!\\[WUITOOLBAR\\[(.*?)\\]\\]>/s", $this->mLayout, $string); $toolbars = implode($string[0]); $toolbars = str_replace('<![WUITOOLBAR[', '', $toolbars); $toolbars = str_replace(']]>', '', $toolbars); // Strip toolbars template $this->mLayout = preg_replace("/<!\\[WUITOOLBAR\\[(.*?)\\]\\]>/s", '', $this->mLayout); // Add toolbars $this->mLayout = str_replace('{[wui-toolbars]}', $toolbars, $this->mLayout); $block = ''; $block .= "</td></tr>\n</table>\n"; if (isset($GLOBALS['gEnv']['runtime']['wui_menu']['footer'])) { $block .= $GLOBALS['gEnv']['runtime']['wui_menu']['footer']; } $block .= "</td></tr></table>\n"; // Ajax support. if (\Innomatic\Wui\Wui::instance('\\Innomatic\\Wui\\Wui')->countRegisteredAjaxCalls() > 0) { $xajax = \Innomatic\Ajax\Xajax::instance('Xajax'); // Show the ajax loader? $xajax->ajaxLoader = $this->mArgs['ajaxloader'] == 'true' ? true : false; // Set debug mode if ($container->getState() == \Innomatic\Core\InnomaticContainer::STATE_DEBUG) { $xajax->debugOn(); } $block .= $xajax->getJavascript($container->getBaseUrl() . '/shared', 'xajax.js'); // Setup calls. if (\Innomatic\Wui\Wui::instance('\\Innomatic\\Wui\\Wui')->countRegisteredAjaxSetupCalls() > 0) { $setup_calls = \Innomatic\Wui\Wui::instance('\\Innomatic\\Wui\\Wui')->getRegisteredAjaxSetupCalls(); $block .= '<script type="text/javascript">' . "\n"; foreach ($setup_calls as $call) { $block .= $call . ";\n"; } $block .= '</script>' . "\n"; } } $block .= "<script type=\"text/javascript\">\n"; $block .= "\n \$( document ).ready(function() {\n resizeSubTopMenu()\n });\n \$( window ).resize(function() {\n resizeSubTopMenu()\n });\n\n function resizeSubTopMenu(){\n heigthThead = \$('#sub-top-menu').height()-35;\n \$('#page-tbody tr td:first').css({ 'padding-top': heigthThead+'px'});\n }"; $block .= "</script>\n"; $block .= "</body>\n</html>\n"; return $block; }
protected function generateSource() { $eventData = new \Innomatic\Wui\Dispatch\WuiEventRawData($this->mArgs['disp'], $this->mName); $this->mLayout = ($this->mComments ? '<!-- begin ' . $this->mName . ' string -->' : '') . '<input' . (isset($this->mArgs['id']) ? ' id="' . $this->mArgs['id'] . '"' : '') . ' type="hidden" name="' . $eventData->getDataString() . '"' . (strlen($this->mArgs['value']) ? ' value="' . \Innomatic\Wui\Wui::utf8_entities($this->mArgs['value']) . '"' : '') . '>' . ($this->mComments ? '<!-- end ' . $this->mName . " string -->\n" : ''); return true; }
public static function dispatchersList() { $result = array(); if (isset(\Innomatic\Wui\Wui::instance('\\Innomatic\\Wui\\Wui')->parameters['wui']) and is_array(\Innomatic\Wui\Wui::instance('\\Innomatic\\Wui\\Wui')->parameters['wui'])) { reset(\Innomatic\Wui\Wui::instance('\\Innomatic\\Wui\\Wui')->parameters['wui']); while (list($dispatcher_name) = each(\Innomatic\Wui\Wui::instance('\\Innomatic\\Wui\\Wui')->parameters['wui'])) { $result[] = $dispatcher_name; } reset(\Innomatic\Wui\Wui::instance('\\Innomatic\\Wui\\Wui')->parameters['wui']); } return $result; }
/** * Launches a panel in the base Innomatic desktop. * * @param string $resource Panel name. */ public function executeBase($resource) { $path = 'base'; // TODO verificare se e' ancora necessario dopo aver creato \Innomatic\Wui\Wui::setTheme() if (!($this->container->getState() == \Innomatic\Core\InnomaticContainer::STATE_SETUP)) { $appCfg = new \Innomatic\Application\ApplicationSettings('innomatic'); if (strlen($appCfg->getKey('wui-root-theme'))) { \Innomatic\Wui\Wui::instance('\\Innomatic\\Wui\\Wui')->setTheme($appCfg->getKey('wui-root-theme')); } unset($appCfg); } else { $path = 'setup'; } if (substr($resource, -1, 1) != '/') { include 'innomatic/desktop/layout/' . $path . '/' . basename($resource) . '.php'; } else { \Innomatic\Webapp\WebAppContainer::instance('\\Innomatic\\Webapp\\WebAppContainer')->getProcessor()->getResponse()->addHeader('P3P', 'CP="CUR ADM OUR NOR STA NID"'); include 'innomatic/desktop/layout/' . $path . '/index.php'; } }
protected function generateSource() { $event_data = new \Innomatic\Wui\Dispatch\WuiEventRawData(isset($this->mArgs['disp']) ? $this->mArgs['disp'] : '', $this->mName); $event_data_id = new \Innomatic\Wui\Dispatch\WuiEventRawData(isset($this->mArgs['disp']) ? $this->mArgs['disp'] : '', $this->mName . '_id'); $this->mLayout = $this->mComments ? '<!-- begin ' . $this->mName . ' string -->' : ''; // JQuery autocomplete if ($this->mArgs['autocomplete'] == true) { //$jquery_id = 'jqautocomplete_'.$this->mName; $this->mLayout .= '<style> .ui-autocomplete-loading { background: white url(\'' . $this->mThemeHandler->mStyle['ajax_mini'] . '\') right center no-repeat; background-size: 16px 16px;} .ui-autocomplete { max-height: 250px; overflow-y: auto; } </style>'; $this->mLayout .= "<script type=\"text/javascript\">\n\$(document).ready(function () {\n\$(\"#" . $this->mArgs['id'] . "\").autocomplete({\nsource: \"" . $this->mArgs['autocompletesearchurl'] . "\",\nselect: function (event, ui) {\n\$( \"#" . $this->mArgs['id'] . "_value\" ).attr( \"value\", ui.item.id );\n},\nminLength: " . $this->mArgs['autocompleteminlength'] . "\n});\n});\n</script>\n"; $def_value = ''; if (isset($this->mArgs['value']) and strlen($this->mArgs['value']) and isset($this->mArgs['autocompletevalueid']) and $this->mArgs['autocompletevalueid'] != '') { $def_value = ' value=\'' . $this->mArgs['autocompletevalueid'] . '\''; } $this->mLayout .= "<input type='hidden' name='" . $event_data_id->getDataString() . "' id='" . $this->mArgs['id'] . '_value\'' . $def_value . '>'; } if ((isset($this->mArgs['required']) and $this->mArgs['required'] == 'true') || (isset($this->mArgs['integer']) and $this->mArgs['integer'] == 'true') || (isset($this->mArgs['email']) and $this->mArgs['email'] == 'true')) { $check_script = ' <script language="JavaScript" type="text/javascript"> <!-- requiredFields[requiredFields.length] = new Array( "' . $event_data->getDataString() . '", "' . $this->mArgs['checkmessage'] . '"'; $check_script .= (isset($this->mArgs['required']) and $this->mArgs['required'] == 'true') ? ', "required"' : ''; $check_script .= (isset($this->mArgs['integer']) and $this->mArgs['integer'] == 'true') ? ', "integer"' : ''; $check_script .= (isset($this->mArgs['email']) and $this->mArgs['email'] == 'true') ? ', "email"' : ''; $check_script .= ' ); --> </script>'; } $this->mLayout .= '<input' . (isset($this->mArgs['id']) ? ' id="' . $this->mArgs['id'] . '"' : '') . $this->getEventsCompleteString() . ' ' . ((isset($this->mArgs['hint']) and strlen($this->mArgs['hint'])) ? 'onMouseOver="wuiHint(\'' . str_replace("'", "\\'", $this->mArgs['hint']) . '\');" onMouseOut="wuiUnHint();" ' : '') . 'type="' . ((isset($this->mArgs['password']) and $this->mArgs['password'] == 'true') ? 'password' : 'text') . '" name="' . $event_data->getDataString() . '"'; $this->mLayout .= ' tabindex="' . $this->mArgs['tabindex'] . '"'; $this->mLayout .= (isset($this->mArgs['value']) and strlen($this->mArgs['value'])) ? ' value="' . \Innomatic\Wui\Wui::utf8_entities($this->mArgs['value']) . '"' : ''; $this->mLayout .= (isset($this->mArgs['hint']) and $this->mArgs['hint']) ? ' alt="' . $this->mArgs['hint'] . '"' : ''; $this->mLayout .= (isset($this->mArgs['bgcolor']) and strlen($this->mArgs['bgcolor'])) ? ' style="background-color: ' . $this->mArgs['bgcolor'] . ';"' : ''; $this->mLayout .= (isset($this->mArgs['size']) and strlen($this->mArgs['size'])) ? ' size="' . $this->mArgs['size'] . '"' : ''; $this->mLayout .= (isset($this->mArgs['maxlength']) and strlen($this->mArgs['maxlength'])) ? ' maxlength="' . $this->mArgs['maxlength'] . '"' : ''; $this->mLayout .= (isset($this->mArgs['readonly']) and strlen($this->mArgs['readonly'])) ? ' readonly' : ''; $this->mLayout .= '>' . ((isset($check_script) and strlen($check_script)) ? $check_script : ''); $this->mLayout .= $this->mComments ? '<!-- end ' . $this->mName . " string -->\n" : ''; return true; }
public static function setDomainTheme() { $container = \Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer'); // Wui theme // $user_settings = new \Innomatic\Domain\User\UserSettings($container->getCurrentDomain()->getDataAccess(), $container->getCurrentUser()->getUserId()); $user_theme = $user_settings->getKey('wui-theme', true); if (!strlen($user_theme)) { $app_cfg = new \Innomatic\Application\ApplicationSettings('innomatic'); if (strlen($app_cfg->getKey('wui-root-theme'))) { $user_theme = $app_cfg->getKey('wui-root-theme'); if (!strlen($user_theme)) { $user_theme = \Innomatic\Wui\Wui::DEFAULT_THEME; } } else { $user_theme = \Innomatic\Wui\Wui::DEFAULT_THEME; } unset($app_cfg); } \Innomatic\Wui\Wui::instance('\\Innomatic\\Wui\\Wui')->setTheme($user_theme); }
public function abort($text, $forceInterface = '') { if (strlen($forceInterface)) { $interface = $forceInterface; } else { $interface = $this->interface; } if ($interface == \Innomatic\Core\InnomaticContainer::INTERFACE_EXTERNAL) { /* if ( isset( $GLOBALS['gEnv']['runtime'] ['external_interface_error_handler']) and function_exists( $GLOBALS['gEnv']['runtime']['external_interface_error_handler'])) { $func = $GLOBALS['gEnv']['runtime'] ['external_interface_error_handler']; $func ($text); } else { */ $interface = \Innomatic\Core\InnomaticContainer::INTERFACE_WEB; $this->interface = \Innomatic\Core\InnomaticContainer::INTERFACE_WEB; //} } switch ($interface) { case \Innomatic\Core\InnomaticContainer::INTERFACE_GUI: // break was intentionally omitted // break was intentionally omitted case \Innomatic\Core\InnomaticContainer::INTERFACE_UNKNOWN: // break was intentionally omitted // break was intentionally omitted case \Innomatic\Core\InnomaticContainer::INTERFACE_WEBSERVICES: // break was intentionally omitted // break was intentionally omitted case \Innomatic\Core\InnomaticContainer::INTERFACE_EXTERNAL: break; case \Innomatic\Core\InnomaticContainer::INTERFACE_CONSOLE: echo "\n" . $text . "\n"; break; case \Innomatic\Core\InnomaticContainer::INTERFACE_WEB: $tmpWui = \Innomatic\Wui\Wui::instance('\\Innomatic\\Wui\\Wui'); $tmpWui->loadWidget('empty'); //$tmp_elem = new WuiEmpty('empty'); $dieImage = \Innomatic\Wui\Wui::instance('\\Innomatic\\Wui\\Wui')->getTheme()->mStyle['biglogo']; ?> <html> <head> <basefont face="Verdana" /> <title>Innomatic</title> <link rel="stylesheet" type="text/css" href="<?php echo \Innomatic\Wui\Wui::instance('\\Innomatic\\Wui\\Wui')->getTheme()->mStyle['css']; ?> "> </head> <body bgcolor="white"> <table border="0" cellspacing="0" cellpadding="0" align="center" width="200" height="100%"> <tr> <td height="50%"> </tr> <tr> <td align="center" valign="middle"><a href="<?php echo \Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getExternalBaseUrl(); ?> " target="_top"><img src="<?php echo $dieImage; ?> " alt="Innomatic" border="0"></a></td> </tr> <tr> <td> </td> </tr> <tr> <td align="center"><?php echo $text; ?> </td> </tr> <tr> <td height="50%"> </tr> </table> </body> </html> <?php break; } $this->halt(); }
* with this package in the file LICENSE. * * @copyright 1999-2014 Innomatic Company * @license http://www.innomatic.io/license/ New BSD License * @link http://www.innomatic.io * @since Class available since Release 5.0 */ namespace Shared\Wui\Validators; // Handling of uploaded files wui eventdata // if (isset($_FILES['wuifiles']) and is_array($_FILES['wuifiles']) and count($_FILES['wuifiles'])) { reset($_FILES); $disps = array(); while (list($key, $val) = each($_FILES['wuifiles']['name'])) { $disps[] = $key; } $args[0] = 'name'; $args[1] = 'type'; $args[2] = 'tmp_name'; $args[3] = 'size'; for ($i = 0; $i < 4; $i++) { reset($disps); reset($_FILES); while (list(, $disp) = each($disps)) { while (list($eventdataname, $eventdatacontent) = each($_FILES['wuifiles'][$args[$i]][$disp]['evd'])) { \Innomatic\Wui\Wui::instance('\\Innomatic\\Wui\\Wui')->parameters['wui'][$disp]['evd'][$eventdataname][$args[$i]] = $eventdatacontent; } } } }
function main_default($eventData) { global $wuiMainFrame, $wuiTitleBar, $innomaticLocale, $actionDispatcher, $wuiMainStatus, $wuiComments, $compressedOb; $appCfg = new \Innomatic\Application\ApplicationSettings('innomatic'); $themesQuery = \Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getDataAccess()->execute('SELECT name,catalog FROM wui_themes '); while (!$themesQuery->eof) { $tmpLocale = new \Innomatic\Locale\LocaleCatalog($themesQuery->getFields('catalog'), \Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getLanguage()); $elements[$themesQuery->getFields('name')] = $tmpLocale->getStr($themesQuery->getFields('name')); $themesQuery->moveNext(); } asort($elements); $themesXmlDef = '<vertgroup><name>vgroup</name><args><halign>center</halign></args><children> <form><name>theme</name><args><action type="encoded">' . urlencode(\Innomatic\Wui\Dispatch\WuiEventsCall::buildEventsCallString('', array(array('view', 'default', ''), array('action', 'settheme', '')))) . '</action></args><children> <grid><name>themegrid</name><children> <label row="0" col="0"><name>themelabel</name><args><label type="encoded">' . urlencode($innomaticLocale->getStr('themes_label')) . '</label><bold>true</bold></args></label> <listbox row="1" col="0"><name>theme</name><args><elements type="array">' . WuiXml::encode($elements) . '</elements><default>' . \Innomatic\Wui\Wui::instance('\\Innomatic\\Wui\\Wui')->getThemeName() . '</default><disp>action</disp><size>10</size></args></listbox> </children></grid> <submit><name>submit</name><args><caption type="encoded">' . urlencode($innomaticLocale->getStr('settheme_submit')) . '</caption></args></submit> </children></form> </children></vertgroup>'; // Service provider settings // Service Provider // $serviceProviderFrame = new WuiVertframe('serviceproviderframe'); $serviceProviderVGroup = new WuiVertgroup('serviceprovidervgroup', array('width' => '100%')); $serviceProviderVGroup->addChild(new WuiLabel('serviceproviderlabel', array('label' => $innomaticLocale->getStr('serviceproviderframe_label'), 'bold' => 'true'))); $serviceProviderGrid = new WuiGrid('serviceprovidergrid', array('rows' => '4', 'cols' => '2')); // Service Provider name // $serviceProviderGrid->addChild(new WuiLabel('serviceprovidername_label', array('label' => $innomaticLocale->getStr('serviceprovidername_label'))), 0, 0); $serviceProviderGrid->addChild(new WuiString('serviceprovidername', array('disp' => 'action', 'size' => '30', 'value' => $appCfg->getKey('serviceprovider-name'))), 0, 1); // Service Provider url // $serviceProviderGrid->addChild(new WuiLabel('serviceproviderurl_label', array('label' => $innomaticLocale->getStr('serviceproviderurl_label'))), 1, 0); $serviceProviderGrid->addChild(new WuiString('serviceproviderurl', array('disp' => 'action', 'size' => '30', 'value' => $appCfg->getKey('serviceprovider-url'))), 1, 1); // Service Provider big logo // $serviceProviderGrid->addChild(new WuiLabel('serviceproviderbiglogo_label', array('label' => $innomaticLocale->getStr('serviceproviderbiglogo_label'))), 2, 0); $serviceProviderGrid->addChild(new WuiFile('serviceproviderbiglogo', array('disp' => 'action')), 2, 1); // Service Provider link logo // $serviceProviderGrid->addChild(new WuiLabel('serviceproviderlogo_label', array('label' => $innomaticLocale->getStr('serviceproviderlogo_label'))), 3, 0); $serviceProviderGrid->addChild(new WuiFile('serviceproviderlinklogo', array('disp' => 'action')), 3, 1); $serviceProviderVGroup->addChild($serviceProviderGrid); $serviceProviderVGroup->addChild(new WuiSubmit('serviceprovidersubmit', array('caption' => $innomaticLocale->getStr('serviceprovider_submit')))); $formEventsCall = new \Innomatic\Wui\Dispatch\WuiEventsCall(); $formEventsCall->addEvent(new \Innomatic\Wui\Dispatch\WuiEvent('action', 'setserviceprovider', '')); $formEventsCall->addEvent(new \Innomatic\Wui\Dispatch\WuiEvent('view', 'default', '')); $serviceProviderForm = new WuiForm('setserviceproviderform', array('action' => $formEventsCall->getEventsCallString())); $serviceProviderForm->addChild($serviceProviderVGroup); // Enabled icons // $enableVGroup = new WuiVertgroup('enablevgroup', array('width' => '100%')); $enableVGroup->addChild(new WuiLabel('enablelabel', array('label' => $innomaticLocale->getStr('enabled_icons_label'), 'bold' => 'true'))); $enableGrid = new WuiGrid('enablegrid', array('rows' => '5', 'cols' => '2')); // Innomatic site link // $enableGrid->addChild(new WuiLabel('innomaticlabel', array('label' => $innomaticLocale->getStr('innomatic_link_enabled_label'))), 0, 1); $enableGrid->addChild(new WuiCheckBox('innomaticicon', array('disp' => 'action', 'checked' => $appCfg->getKey('innomatic-link-disabled') ? 'false' : 'true')), 0, 0); // Service Provider link // $enableGrid->addChild(new WuiLabel('serviceprovidericonlabel', array('label' => $innomaticLocale->getStr('serviceprovider_link_enabled_label'))), 1, 1); $enableGrid->addChild(new WuiCheckBox('serviceprovidericon', array('disp' => 'action', 'checked' => $appCfg->getKey('serviceprovider-link-disabled') ? 'false' : 'true')), 1, 0); // Innomatic big logo // $enableGrid->addChild(new WuiLabel('innomaticbigiconlabel', array('label' => $innomaticLocale->getStr('innomatic_biglogo_enabled_label'))), 2, 1); $enableGrid->addChild(new WuiCheckBox('innomaticbigicon', array('disp' => 'action', 'checked' => $appCfg->getKey('innomatic-biglogo-disabled') ? 'false' : 'true')), 2, 0); // Service Provider logo // $enableGrid->addChild(new WuiLabel('serviceprovidericonlabel', array('label' => $innomaticLocale->getStr('serviceprovider_biglogo_enabled_label'))), 3, 1); $enableGrid->addChild(new WuiCheckBox('serviceproviderbigicon', array('disp' => 'action', 'checked' => $appCfg->getKey('serviceprovider-biglogo-disabled') ? 'false' : 'true')), 3, 0); $enableVGroup->addChild($enableGrid); $enableVGroup->addChild(new WuiSubmit('enablesubmit', array('caption' => $innomaticLocale->getStr('enable_submit')))); $formEventsCall = new \Innomatic\Wui\Dispatch\WuiEventsCall(); $formEventsCall->addEvent(new \Innomatic\Wui\Dispatch\WuiEvent('action', 'setenabledicons', '')); $formEventsCall->addEvent(new \Innomatic\Wui\Dispatch\WuiEvent('view', 'default', '')); $enableForm = new WuiForm('setenableform', array('action' => $formEventsCall->getEventsCallString())); $enableForm->addChild($enableVGroup); // Advanced settings // $advancedVGroup = new WuiVertgroup('enablevgroup', array('width' => '100%')); $advancedVGroup->addChild(new WuiLabel('enablelabel', array('label' => $innomaticLocale->getStr('advancedsettings_label'), 'bold' => 'true'))); $advancedGrid = new WuiGrid('enablegrid', array('rows' => '2', 'cols' => '2')); // Compressed output buffering // $advancedGrid->addChild(new WuiLabel('compressed-ob-label', array('label' => $innomaticLocale->getStr('compressed-ob_label'))), 0, 1); if (!strlen($compressedOb)) { if (\Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getConfig()->value('CompressedOutputBuffering') == '1') { $compressedOb = 'true'; } else { $compressedOb = 'false'; } } $advancedGrid->addChild(new WuiCheckBox('compressed-ob', array('disp' => 'action', 'checked' => $compressedOb)), 0, 0); // WUI code comments // $advancedGrid->addChild(new WuiLabel('wui-comments-label', array('label' => $innomaticLocale->getStr('wui-comments_label'))), 1, 1); if (!strlen($wuiComments)) { if (\Innomatic\Wui\Wui::showSourceComments()) { $wuiComments = 'true'; } else { $wuiComments = 'false'; } } $advancedGrid->addChild(new WuiCheckBox('wui-comments', array('disp' => 'action', 'checked' => $wuiComments)), 1, 0); $advancedVGroup->addChild($advancedGrid); $advancedVGroup->addChild(new WuiSubmit('enablesubmit', array('caption' => $innomaticLocale->getStr('advanced_submit')))); $formEventsCall = new \Innomatic\Wui\Dispatch\WuiEventsCall(); $formEventsCall->addEvent(new \Innomatic\Wui\Dispatch\WuiEvent('action', 'setadvanced', '')); $formEventsCall->addEvent(new \Innomatic\Wui\Dispatch\WuiEvent('view', 'default', '')); $advancedForm = new WuiForm('setenableform', array('action' => $formEventsCall->getEventsCallString())); $advancedForm->addChild($advancedVGroup); $tabHeaders[0]['label'] = $innomaticLocale->getStr('themes_title'); $tabHeaders[1]['label'] = $innomaticLocale->getStr('serviceproviderframe_label'); $tabHeaders[2]['label'] = $innomaticLocale->getStr('enabled_icons_label'); $tabHeaders[3]['label'] = $innomaticLocale->getStr('advancedsettings_label'); $tab = new WuiTab('interface', array('tabactionfunction' => 'interface_tab_action_builder', 'activetab' => isset($eventData['activetab']) ? $eventData['activetab'] : '', 'tabs' => $tabHeaders)); $tab->addChild(new WuiXml('page', array('definition' => $themesXmlDef))); $tab->addChild($serviceProviderForm); $tab->addChild($enableForm); $tab->addChild($advancedForm); $wuiMainFrame->addChild($tab); $wuiTitleBar->mTitle .= ' - ' . $innomaticLocale->getStr('default_title'); }
function main_applicationlog($eventData) { global $gLocale, $gLocale, $gPageTitle, $wuiMainVertGroup, $gPageContent; $query = \Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getDataAccess()->execute('SELECT appid FROM applications WHERE id=' . $eventData['appid']); $applicationData = $query->getFields(); $gPageContent = new WuiVertgroup('vgroup'); $appLogContent = ''; if (file_exists(\Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getHome() . 'core/applications/' . $applicationData['appid'] . '/application.log')) { $logToolbar = new WuiToolBar('logbar'); $cleanLogAction = new \Innomatic\Wui\Dispatch\WuiEventsCall(); $cleanLogAction->addEvent(new \Innomatic\Wui\Dispatch\WuiEvent('view', 'default', '')); $cleanLogAction->addEvent(new \Innomatic\Wui\Dispatch\WuiEvent('action', 'cleanmodlog', array('appid' => $applicationData['appid']))); $cleanLogButton = new WuiButton('cleanlogbutton', array('label' => $gLocale->getStr('cleanlog_button'), 'themeimage' => 'documentdelete', 'action' => $cleanLogAction->getEventsCallString())); $logToolbar->addChild($cleanLogButton); $logFrame = new WuiHorizframe('logframe'); $logFrame->addChild($logToolbar); $wuiMainVertGroup->addChild($logFrame); $appLogContent = file_get_contentes(\Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getHome() . 'core/applications/' . $applicationData['appid'] . '/application.log'); } $wuiVGroup->addChild(new WuiText('modlog', array('disp' => 'action', 'readonly' => 'true', 'value' => \Innomatic\Wui\Wui::utf8_entities($appLogContent), 'rows' => '20', 'cols' => '120')), 0, 1); $gPageTitle .= ' - ' . $applicationData['appid'] . ' - ' . $gLocale->getStr('modlog.title'); }
protected function generateSource() { $buttonTextColorClass = 'buttontext'; $mouseOutColor = $this->mThemeHandler->mColorsSet['pages']['bgcolor']; $mouseOverColor = $this->mThemeHandler->mColorsSet['buttons']['notselected']; if ($this->mArgs['mainaction'] == 'true') { $buttonTextColorClass = 'buttontextmainaction'; $mouseOutColor = '#24c128'; $mouseOverColor = '#00ff06'; } elseif ($this->mArgs['dangeraction'] == 'true') { $buttonTextColorClass = 'buttontextdangeraction'; $mouseOutColor = '#e93f33'; $mouseOverColor = '#ff1100'; } $this->mArgs['mainaction'] = 'false'; if ($this->mArgs['themeimagetype'] == 'actions') { $image_width = 20; $image_height = 20; } else { if ($this->mArgs['themeimagetype'] == 'mini') { $image_width = 15; $image_height = 15; } else { if ($this->mArgs['themeimagetype'] == 'big') { $image_width = 60; $image_height = 60; } else { if (isset($this->mArgs['themeimage']) and strlen($this->mArgs['themeimage'])) { $image_width = 30; $image_height = 30; } } } } $sizes = ''; if (isset($this->mArgs['themeimage']) and strlen($this->mArgs['themeimage'])) { $sizes = ' style="width: ' . $image_width . 'px; height: ' . $image_height . 'px;"'; } else { if (isset($this->mArgs['width']) or isset($this->mArgs['height'])) { $sizes = ' style="'; isset($this->mArgs['width']) ? $sizes .= 'width: ' . $this->mArgs['width'] . 'px;' : ''; isset($this->mArgs['height']) ? $sizes .= 'height: ' . $this->mArgs['height'] . 'px;' : ''; $sizes .= '"'; } } $this->mLayout = ($this->mComments ? '<!-- begin ' . $this->mName . ' button -->' : '') . '<table' . (isset($this->mArgs['id']) ? ' id="' . $this->mArgs['id'] . '"' : '') . $this->getEventsCompleteString() . ($this->mArgs['compact'] == 'true' ? ' cellpadding="1" cellspacing="0"' : ' cellpadding="4"') . ' style="background-color: ' . $mouseOutColor . ';' . ($this->mArgs['disabled'] == 'true' ? 'cursor: default;' : 'cursor: pointer;') . '"' . ($this->mArgs['disabled'] == 'true' ? '' : ($this->mArgs['highlight'] == 'true' ? ' onMouseOver="this.style.backgroundColor=\'' . $mouseOverColor . '\';' . ((isset($this->mArgs['label']) and strlen($this->mArgs['label'])) ? 'wuiHint(\'' . str_replace("'", "\\'", $this->mArgs['label']) . '\');' : '') . '" onMouseOut="this.style.backgroundColor=\'' . $mouseOutColor . '\';wuiUnHint();"' : '') . ' onClick="' . ((isset($this->mArgs['needconfirm']) and $this->mArgs['needconfirm'] == 'true') ? 'javascript:if ( confirm(\'' . $this->mArgs['confirmmessage'] . '\') ) {' : '') . ($this->mArgs['highlight'] == 'true' ? 'this.style.backgroundColor=\'' . $this->mThemeHandler->mColorsSet['buttons']['selected'] . '\';' : '') . ((isset($this->mArgs['formsubmit']) and strlen($this->mArgs['formsubmit'])) ? 'void(submitForm(\'' . $this->mArgs['formsubmit'] . '\',\'' . $this->mArgs['action'] . '\',\'' . (isset($this->mArgs['formcheckmessage']) ? $this->mArgs['formcheckmessage'] : '') . '\',\'' . ((isset($this->mArgs['target']) and strlen($this->mArgs['target'])) ? $this->mArgs['target'] : '') . '\'));' : ((isset($this->mArgs['target']) and strlen($this->mArgs['target']) and $this->mArgs['target'] != '_blank') ? $this->mArgs['target'] . '.' : '') . ((isset($this->mArgs['target']) and $this->mArgs['target'] == '_blank') ? 'window.open(\'' : 'location.href=\'') . $this->mArgs['action'] . ((isset($this->mArgs['target']) and $this->mArgs['target'] == '_blank') ? '\')' : '\'')) . ((isset($this->mArgs['needconfirm']) and $this->mArgs['needconfirm'] == 'true') ? '}' : '') . '"') . '><tr valign="middle"><td class="normalbig" align="center" ' . ($this->mArgs['nowrap'] == 'true' ? 'nowrap style="white-space: nowrap" ' : '') . ' valign="middle"><center>' . ((isset($this->mArgs['image']) and strlen($this->mArgs['image'])) ? '<img src="' . $this->mArgs['image'] . '" align="middle" border="0"' . $sizes . ((isset($this->mArgs['hint']) and strlen($this->mArgs['hint'])) ? ' alt="' . $this->mArgs['hint'] . '"' : 'alt=""') . '>' . ((isset($this->mArgs['horiz']) and $this->mArgs['horiz']) == 'true' ? '</center></td><td class="normalbig" align="center" ' . ($this->mArgs['nowrap'] == 'true' ? 'nowrap style="white-space: nowrap"' : '') . ' valign="middle"><center>' : '<br>') : '') . ($this->mArgs['disabled'] == 'true' ? '<font color="' . $this->mThemeHandler->mColorsSet['buttons']['disabledtext'] . '">' . ($this->mArgs['mainaction'] == 'true' ? '<strong>' : '') . ((isset($this->mArgs['label']) and strlen($this->mArgs['label'])) ? \Innomatic\Wui\Wui::utf8_entities($this->mArgs['label']) : "") . ($this->mArgs['mainaction'] == 'true' ? '</strong>' : '') . '</font>' : '<font color="' . $this->mThemeHandler->mColorsSet['buttons']['text'] . '"><span class="' . $buttonTextColorClass . '">' . ($this->mArgs['mainaction'] == 'true' ? '<strong>' : '') . ((isset($this->mArgs['label']) and strlen($this->mArgs['label'])) ? \Innomatic\Wui\Wui::utf8_entities($this->mArgs['label']) : "") . ($this->mArgs['mainaction'] == 'true' ? '</strong>' : '')) . '</span></font></center></td></tr></table>' . ($this->mComments ? '<!-- end ' . $this->mName . " button -->\n" : ''); return true; }
function main_showrootwebserviceslog($eventData) { global $gLocale, $gPageTitle, $gXmlDefinition, $gToolbars; $gWui = \Innomatic\Wui\Wui::instance('\\Innomatic\\Wui\\Wui'); $gWui->loadWidget('vertgroup'); $gWui->loadWidget('toolbars'); $logContent = ''; if (file_exists(\Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getHome() . 'core/log/webservices.log')) { $cleanLogAction = new \Innomatic\Wui\Dispatch\WuiEventsCall(); $cleanLogAction->addEvent(new \Innomatic\Wui\Dispatch\WuiEvent('view', 'showrootwebserviceslog', '')); $cleanLogAction->addEvent(new \Innomatic\Wui\Dispatch\WuiEvent('action', 'cleanrootwebserviceslog', '')); $gToolbars['logs']['cleanlog'] = array('view' => array('label' => $gLocale->getStr('cleanlog_button'), 'themeimage' => 'documentdelete', 'horiz' => 'true', 'action' => $cleanLogAction->getEventsCallString())); if (file_exists(\Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getHome() . 'core/log/webservices.log')) { $logContent = file_get_contents(\Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getHome() . 'core/log/webservices.log'); } } $gXmlDefinition = '<vertgroup><name /> <children> <text><name>rootlog</name> <args> <disp>action</disp> <readonly>true</readonly> <rows>20</rows> <cols>120</cols> <value type="encoded">' . urlencode(\Innomatic\Wui\Wui::utf8_entities($logContent)) . '</value> </args> </text> </children> </vertgroup>'; $gPageTitle .= ' - ' . $gLocale->getStr('rootwebserviceslog_title'); }
/** * Class constructor. * * @param string $elemName Widget instance unique name. * @param array $elemArgs Widget arguments and attributes. * @param string $elemTheme Theme name to be applied to the element. Not used anymore. * @param array $dispEvents Dispatcher events. */ public function __construct($elemName, $elemArgs = '', $elemTheme = '', $dispEvents = '') { $this->mName = $elemName; $this->mArgs =& $elemArgs; $this->mComments = \Innomatic\Wui\Wui::showSourceComments(); $container = \Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer'); $wuiContainer = \Innomatic\Wui\Wui::instance('\\Innomatic\\Wui\\Wui'); if (is_array($dispEvents)) { $this->mDispEvents =& $dispEvents; } $currentWuiTheme = $wuiContainer->getThemeName(); if (strlen($elemTheme) and $elemTheme != $currentWuiTheme) { $this->mTheme = $elemTheme; $this->mThemeHandler = new \Innomatic\Wui\WuiTheme($container->getDataAccess(), $this->mTheme); } else { $this->mTheme = $currentWuiTheme; $this->mThemeHandler = $wuiContainer->getTheme(); } if (isset($this->mArgs['usesession']) and ($this->mArgs['usesession'] == 'true' or $this->mArgs['usesession'] == 'false')) { $this->mUseSession = $this->mArgs['usesession']; } else { $this->mUseSession = 'true'; } // Initialise session parameters. if (isset($this->mArgs['sessionobjectnouser'])) { $this->mSessionObjectNoUser = $this->mArgs['sessionobjectnouser']; } if (isset($this->mArgs['sessionobjectnopage'])) { $this->mSessionObjectNoPage = $this->mArgs['sessionobjectnopage']; } if (isset($this->mArgs['sessionobjectnotype'])) { $this->mSessionObjectNoType = $this->mArgs['sessionobjectnotype']; } if (isset($this->mArgs['sessionobjectnoname'])) { $this->mSessionObjectNoName = $this->mArgs['sessionobjectnoname']; } if (isset($this->mArgs['sessionobjectusername'])) { $this->mSessionObjectUserName = $this->mArgs['sessionobjectusername']; } $url_path = ''; if ($this->mSessionObjectNoPage != 'true') { $url_path = $_SERVER['REQUEST_URI']; if (strpos($url_path, '?')) { $url_path = substr($url_path, 0, strpos($url_path, '?')); } $url_path .= '_'; } $this->mSessionObjectName = ($this->mSessionObjectNoUser == 'true' ? '' : (is_object($container->getCurrentUser()) ? $container->getCurrentUser()->getUserName() : 'root') . '_') . $url_path . ($this->mSessionObjectNoType == 'true' ? '' : get_class($this) . '_') . ($this->mSessionObjectNoName == 'true' ? '' : $this->mName) . (strlen($this->mSessionObjectUserName) ? '_' . $this->mSessionObjectUserName : ''); // Check if the widget should be prepared once for all instances $widgetName = substr(get_class($this), 3); if (!isset($wuiContainer->preparedWidgets[$widgetName])) { // Register action ajax calls $theObject = new \ReflectionObject($this); $methods = $theObject->getMethods(); foreach ($methods as $method) { // Ignore private methods $theMethod = new \ReflectionMethod($theObject->getName(), $method->getName()); if (!$theMethod->isPublic()) { continue; } // Expose only methods beginning with "ajax" prefix if (!(substr($method->getName(), 0, 4) == 'ajax')) { continue; } // Register the ajax call $call_name = substr($method->getName(), 4); $wuiContainer->registerAjaxCall($call_name); $wuiContainer->getXajax()->registerExternalFunction(array($call_name, get_class($this), $method->getName()), 'shared/wui/' . get_class($this) . '.php'); } // Set the widget as prepared $wuiContainer->preparedWidgets[$widgetName] = $widgetName; } }
public function viewshowdataaccesslog($eventData) { $query = \Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getDataAccess()->execute('SELECT * FROM domains WHERE id=' . $eventData['domainid']); if ($query->getNumberRows()) { $domainData = $query->getFields(); $wuiVgroup = new WuiVertgroup('vgroup'); $dbLogContent = ''; if (file_exists(\Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getHome() . 'core/domains/' . $domainData['domainid'] . '/log/dataaccess.log')) { $logToolbar = new WuiToolBar('logbar'); $cleanlogAction = new \Innomatic\Wui\Dispatch\WuiEventsCall(); $cleanlogAction->addEvent(new \Innomatic\Wui\Dispatch\WuiEvent('view', 'showdataaccesslog', array('domainid' => $eventData['domainid']))); $cleanlogAction->addEvent(new \Innomatic\Wui\Dispatch\WuiEvent('action', 'cleandataaccesslog', array('domainid' => $eventData['domainid']))); $cleanlogButton = new WuiButton('cleanlogbutton', array('label' => $this->_localeCatalog->getStr('cleanlog_button'), 'themeimage' => 'documentdelete', 'horiz' => 'true', 'action' => $cleanlogAction->getEventsCallString())); $logToolbar->addChild($cleanlogButton); $this->wuiMainvertgroup->addChild($logToolbar); $dbLogContent = file_get_contents(\Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getHome() . 'core/domains/' . $domainData['domainid'] . '/log/dataaccess.log'); } $wuiVgroup->addChild(new WuiText('dataaccesslog', array('disp' => 'action', 'readonly' => 'true', 'value' => \Innomatic\Wui\Wui::utf8_entities($dbLogContent), 'rows' => '20', 'cols' => '120')), 0, 1); $this->wuiMainframe->addChild($wuiVgroup); } $this->wuiTitlebar->mArgs['title'] .= ' - ' . $domainData['domainid'] . ' (' . $domainData['domainname'] . ') - ' . $this->_localeCatalog->getStr('showdataaccesslog_title'); }
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(); }
* @license http://www.innomatic.io/license/ New BSD License * @link http://www.innomatic.io * @since Class available since Release 5.0 */ // NOTE: This is an old-style panel code with a single file // acting as model, view and controller. use Innomatic\Core\InnomaticContainer; use Innomatic\Wui\Widgets; use Innomatic\Wui\Dispatch; use Innomatic\Locale\LocaleCatalog; use Innomatic\Domain\User; use Shared\Wui; global $wuiMainStatus, $wuiMainFrame, $innomaticLocale, $wuiTitleBar; $log = \Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getLogger(); $innomaticLocale = new LocaleCatalog('innomatic::domain_password', \Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getCurrentUser()->getLanguage()); $wui = \Innomatic\Wui\Wui::instance('\\Innomatic\\Wui\\Wui'); $wui->loadWidget('button'); $wui->loadWidget('checkbox'); $wui->loadWidget('combobox'); $wui->loadWidget('date'); $wui->loadWidget('empty'); $wui->loadWidget('file'); $wui->loadWidget('formarg'); $wui->loadWidget('form'); $wui->loadWidget('grid'); $wui->loadWidget('helpnode'); $wui->loadWidget('horizbar'); $wui->loadWidget('horizframe'); $wui->loadWidget('horizgroup'); $wui->loadWidget('image'); $wui->loadWidget('label');
/** * 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(); }