function main_showmethods($eventData)
{
    global $wuiMainFrame, $innomaticLocale, $wuiMainStatus, $wuiTitleBar;
    $accQuery = \Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getDataAccess()->execute('SELECT name FROM webservices_accounts WHERE id=' . $eventData['accountid']);
    $accData = $accQuery->getFields();
    $wuiVGroup = new WuiVertgroup('vgroup');
    $xmlrpcAccount = new \Innomatic\Webservices\WebServicesAccount($eventData['accountid']);
    $xmlrpcClient = new \Innomatic\Webservices\Xmlrpc\XmlRpcClient($xmlrpcAccount->mPath, $xmlrpcAccount->mHost, $xmlrpcAccount->mPort);
    $xmlrpcClient->setProxy($xmlrpcAccount->mProxy, $xmlrpcAccount->mProxyPort);
    $xmlrpcClient->setCredentials($xmlrpcAccount->mUsername, $xmlrpcAccount->mPassword);
    $xmlrpcMessage = new \Innomatic\Webservices\Xmlrpc\XmlRpcMsg('system.listMethods');
    $xmlrpcResp = $xmlrpcClient->Send($xmlrpcMessage);
    if ($xmlrpcResp) {
        if (!$xmlrpcResp->FaultCode()) {
            $xv = $xmlrpcResp->Value();
            if (is_object($xv)) {
                $methods = \Innomatic\Webservices\Xmlrpc\php_xmlrpc_decode($xv);
                //$methods_val = $xv->scalarVal();
                if (is_array($methods)) {
                    $headers[0]['label'] = $innomaticLocale->getStr('method.header');
                    $methodsTable = new WuiTable('methods', array('elements' => [], 'headers' => $headers, 'rowsperpage' => '20', 'pagesactionfunction' => 'methods_list_action_builder', 'pagenumber' => isset($eventData['methodspage']) ? $eventData['methodspage'] : 1));
                    $row = 0;
                    while (list($key, $val) = each($methods)) {
                        $methodsTable->addChild(new WuiLabel('method', array('label' => $val)), $row, 0);
                        $row++;
                    }
                    $wuiVGroup->addChild($methodsTable);
                }
            }
        } else {
            $wuiMainStatus->mArgs['status'] = $innomaticLocale->getStr('server_response_error');
        }
    } else {
        $wuiMainStatus->mArgs['status'] = $innomaticLocale->getStr('invalid_server_response');
    }
    //$wuiVGroup
    $wuiMainFrame->addChild($wuiVGroup);
    $wuiTitleBar->mArgs['title'] .= ' - ' . $accData['name'] . ' - ' . $innomaticLocale->getStr('showmethods_title');
}
 public function viewDefault($eventData)
 {
     $usersQuery = \Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getCurrentDomain()->getDataAccess()->execute('SELECT id,username,fname,lname,email,groupid,disabled FROM domain_users ORDER BY username');
     $profQuery = \Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getCurrentDomain()->getDataAccess()->execute('SELECT id,groupname FROM domain_users_groups ORDER BY groupname');
     $profiles = array();
     while (!$profQuery->eof) {
         $profData = $profQuery->getFields();
         $profiles[$profData['id']] = $profData['groupname'];
         $profQuery->moveNext();
     }
     if ($usersQuery->getNumberRows()) {
         $headers[0]['label'] = $this->localeCatalog->getStr('status_header');
         $headers[1]['label'] = $this->localeCatalog->getStr('username_header');
         $headers[2]['label'] = $this->localeCatalog->getStr('completename_header');
         $headers[3]['label'] = $this->localeCatalog->getStr('email_header');
         $headers[4]['label'] = $this->localeCatalog->getStr('userprofilename_header');
         $row = 0;
         $wuiUsersTable = new WuiTable('userstable', array('headers' => $headers));
         while (!$usersQuery->eof) {
             $userData = $usersQuery->getFields();
             if ($userData['disabled'] == \Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getCurrentDomain()->getDataAccess()->fmttrue) {
                 $enabled = false;
             } else {
                 $enabled = true;
             }
             $chDataAction[$row] = new WuiEventsCall();
             $chDataAction[$row]->addEvent(new WuiEvent('view', 'edituser', array('userid' => $userData['id'])));
             if ($enabled) {
                 $wuiUsersTable->addChild(new WuiImage('status' . $row, array('imageurl' => $this->wuiMainframe->mThemeHandler->mStyle['greenball'])), $row, 0, 'center');
             } else {
                 $wuiUsersTable->addChild(new WuiImage('status' . $row, array('imageurl' => $this->wuiMainframe->mThemeHandler->mStyle['redball'])), $row, 0, 'center');
             }
             $wuiUsersTable->addChild(new WuiLink('usernamelabel' . $row, array('label' => $userData['username'], 'link' => $chDataAction[$row]->getEventsCallString())), $row, 1);
             $wuiUsersTable->addChild(new WuiLabel('completenamelabel' . $row, array('label' => strcmp($userData['username'], \Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getCurrentDomain()->getDomainId()) != 0 ? $userData['lname'] . ' ' . $userData['fname'] : $this->localeCatalog->getStr('superuser_label'))), $row, 2);
             $wuiUsersTable->addChild(new WuiLabel('emaillabel' . $row, array('label' => $userData['email'])), $row, 3);
             $wuiUsersTable->addChild(new WuiLabel('userprofilelabel' . $row, array('label' => ($userData['groupid'] != '0' and strlen($userData['groupid'])) ? $profiles[$userData['groupid']] : $this->localeCatalog->getStr('noprofileid_label'))), $row, 4);
             if (\Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getCurrentUser()->hasPermission('edit_password_all')) {
                 $wuiUserToolbar[$row] = new WuiHorizgroup('usertoolbar' . $row);
                 $chPasswdAction[$row] = new WuiEventsCall();
                 $chPasswdAction[$row]->addEvent(new WuiEvent('view', 'chpassword', array('userid' => $userData['id'])));
                 $wuiChPasswdButton[$row] = new WuiButton('chpasswdbutton' . $row, array('label' => $this->localeCatalog->getStr('chpasswd_label'), 'themeimage' => 'documenttext', 'themeimagetype' => 'mini', 'horiz' => 'true', 'action' => $chPasswdAction[$row]->getEventsCallString()));
                 $wuiUserToolbar[$row]->addChild($wuiChPasswdButton[$row]);
                 $wuiChDataButton[$row] = new WuiButton('chdatabutton' . $row, array('label' => $this->localeCatalog->getStr('chdata_label'), 'themeimage' => 'documenttext', 'themeimagetype' => 'mini', 'horiz' => 'true', 'action' => $chDataAction[$row]->getEventsCallString()));
                 $wuiUserToolbar[$row]->addChild($wuiChDataButton[$row]);
                 if (!\Domain\User\User::isAdminUser($userData['username'], \Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getCurrentDomain()->domainid)) {
                     $removeAction[$row] = new WuiEventsCall();
                     $removeAction[$row]->addEvent(new WuiEvent('view', 'deleteuser', array('userid' => $userData['id'])));
                     $enableAction = new WuiEventsCall();
                     $enableAction->addEvent(new WuiEvent('action', $enabled ? 'disableuser' : 'enableuser', array('userid' => $userData['id'])));
                     $wuiEnableButton = new WuiButton('enablebutton' . $row, array('label' => $this->localeCatalog->getStr($enabled ? 'disableuser_label' : 'enableuser_label'), 'themeimage' => $enabled ? 'lock' : 'unlock', 'themeimagetype' => 'mini', 'horiz' => 'true', 'action' => $enableAction->getEventsCallString()));
                     $wuiUserToolbar[$row]->addChild($wuiEnableButton);
                     $wuiRemoveButton[$row] = new WuiButton('removebutton' . $row, array('label' => $this->localeCatalog->getStr('removeuser_label'), 'themeimage' => 'trash', 'themeimagetype' => 'mini', 'horiz' => 'true', 'action' => $removeAction[$row]->getEventsCallString()));
                     $wuiUserToolbar[$row]->addChild($wuiRemoveButton[$row]);
                 }
                 $wuiUsersTable->addChild($wuiUserToolbar[$row], $row, 5);
             }
             $usersQuery->moveNext();
             $row++;
         }
         $this->wuiMainframe->addChild($wuiUsersTable);
     }
     $this->wuiTitlebar->mTitle .= ' - ' . $this->localeCatalog->getStr('users_title');
 }
    public function viewdomainapplications($eventData)
    {
        $domainQuery = \Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getDataAccess()->execute('SELECT * FROM domains WHERE id=' . $eventData['domainid']);
        $domainData = $domainQuery->getFields();
        $applicationsQuery = \Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getDataAccess()->execute('SELECT * FROM applications WHERE onlyextension <> ' . \Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getDataAccess()->formatText(\Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getDataAccess()->fmttrue) . ' ORDER BY appid');
        if ($applicationsQuery) {
            if ($applicationsQuery->getNumberRows()) {
                $headers[0]['label'] = $this->_localeCatalog->getStr('status_header');
                $headers[1]['label'] = $this->_localeCatalog->getStr('applicationid_header');
                $headers[2]['label'] = $this->_localeCatalog->getStr('modactivationdate_header');
                $headers[4]['label'] = $this->_localeCatalog->getStr('appdeps_header');
                $row = 0;
                $wuiDomainApplicationsTable = new WuiTable('domainapplicationstable', array('headers' => $headers));
                while (!$applicationsQuery->eof) {
                    $applicationsData = $applicationsQuery->getFields();
                    if ($applicationsData['appid'] != 'innomatic') {
                        $actQuery = \Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getDataAccess()->execute('SELECT * FROM applications_enabled WHERE domainid = ' . $eventData['domainid'] . ' AND applicationid = ' . $applicationsData['id']);
                        $wuiEnGroup[$row] = new WuiVertgroup('enable');
                        $wuiDomainApplicationsToolbar[$row] = new WuiHorizgroup('domainapplicationstoolbar' . $row);
                        $appDep = new \Innomatic\Application\ApplicationDependencies();
                        if ($actQuery->getNumberRows()) {
                            // Application is enabled
                            //
                            $actData = $actQuery->getFields();
                            $wuiDomainApplicationsTable->addChild(new WuiImage('status' . $row, array('imageurl' => $this->wuiMainframe->mThemeHandler->mStyle['greenball'])), $row, 0);
                            $wuiDomainApplicationsTable->addChild(new WuiLabel('appid' . $row, array('label' => $applicationsData['appid'], 'compact' => 'true')), $row, 1);
                            $wuiDomainApplicationsTable->addChild(new WuiLabel('actdate' . $row, array('label' => $actData['activationdate'], 'compact' => 'true')), $row, 2);
                            $domainDependingApplications = $appDep->checkDomainDependingApplications($applicationsData['appid'], $domainData['domainid']);
                            $application = new \Innomatic\Application\Application(\Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getDataAccess(), $applicationsData['id']);
                            $options = $application->getOptions();
                            if (!$domainDependingApplications) {
                                // No applications depends on this one
                                //
                                $disableAction[$row] = new \Innomatic\Wui\Dispatch\WuiEventsCall();
                                $disableAction[$row]->addEvent(new \Innomatic\Wui\Dispatch\WuiEvent('view', 'domainapplications', array('domainid' => $eventData['domainid'])));
                                $disableAction[$row]->addEvent(new \Innomatic\Wui\Dispatch\WuiEvent('action', 'deactivateapplication', array('domainid' => $eventData['domainid'], 'appid' => $applicationsData['id'])));
                                $wuiSisableButton[$row] = new WuiButton('disablebutton' . $row, array('label' => $this->_localeCatalog->getStr('deactivateapplication_label'), 'horiz' => 'true', 'themeimage' => 'buttoncancel', 'action' => $disableAction[$row]->getEventsCallString()));
                                $wuiDomainApplicationsToolbar[$row]->addChild($wuiSisableButton[$row]);
                                $wuiEnGroup[$row]->addChild($wuiDomainApplicationsToolbar[$row]);
                            } else {
                                // At least one application depends on this one
                                //
                                $appDepListStr = '';
                                while (list(, $dep) = each($domainDependingApplications)) {
                                    $appDepListStr .= $dep . '<br>';
                                }
                                $wuiDomainApplicationsTable->addChild(new WuiLabel('appdeps' . $row, array('label' => $appDepListStr)), $row, 4);
                            }
                            if (count($options)) {
                                $toolbar = array();
                                while (list(, $name) = each($options)) {
                                    $enabled = $application->checkIfOptionEnabled($name, $eventData['domainid']);
                                    $toolbar['view']['enable'] = array('label' => sprintf($this->_localeCatalog->getStr(($enabled ? 'disable' : 'enable') . '_option.button'), ucfirst($name)), 'themeimage' => $enabled ? 'buttoncancel' : 'buttonok', 'compact' => 'true', 'themeimagetype' => 'mini', 'horiz' => 'true', 'action' => \Innomatic\Wui\Dispatch\WuiEventsCall::buildEventsCallString('', array(array('view', 'domainapplications', array('domainid' => $eventData['domainid'])), array('action', $enabled ? 'disableoption' : 'enableoption', array('applicationid' => $applicationsData['id'], 'domainid' => $eventData['domainid'], 'option' => $name)))));
                                    $wuiEnGroup[$row]->addChild(new WuiInnomaticToolBar('view', array('frame' => 'false', 'toolbars' => $toolbar)));
                                }
                            }
                            $wuiDomainApplicationsTable->addChild($wuiEnGroup[$row], $row, 3);
                        } else {
                            // Application is not enabled
                            //
                            $wuiDomainApplicationsTable->addChild(new WuiImage('status' . $row, array('imageurl' => $this->wuiMainframe->mThemeHandler->mStyle['redball'])), $row, 0);
                            $wuiDomainApplicationsTable->addChild(new WuiLabel('appid' . $row, array('label' => $applicationsData['appid'])), $row, 1);
                            $domainApplicationDeps = $appDep->checkDomainApplicationDependencies($applicationsData['appid'], $domainData['domainid'], \Innomatic\Application\ApplicationDependencies::TYPE_DEPENDENCY);
                            if (!is_array($domainApplicationDeps)) {
                                // All application dependecies are met
                                //
                                $enableAction[$row] = new \Innomatic\Wui\Dispatch\WuiEventsCall();
                                $enableAction[$row]->addEvent(new \Innomatic\Wui\Dispatch\WuiEvent('view', 'domainapplications', array('domainid' => $eventData['domainid'])));
                                $enableAction[$row]->addEvent(new \Innomatic\Wui\Dispatch\WuiEvent('action', 'activateapplication', array('domainid' => $eventData['domainid'], 'appid' => $applicationsData['id'])));
                                $wuiEnableButton[$row] = new WuiButton('enablebutton' . $row, array('label' => $this->_localeCatalog->getStr('activateapplication_label'), 'horiz' => 'true', 'themeimage' => 'buttonok', 'action' => $enableAction[$row]->getEventsCallString()));
                                $wuiDomainApplicationsToolbar[$row]->addChild($wuiEnableButton[$row]);
                            } else {
                                // At least one application dependency is not met
                                //
                                $appDepListStr = '';
                                while (list(, $dep) = each($domainApplicationDeps)) {
                                    $appDepListStr .= $dep . '<br>';
                                }
                                $wuiDomainApplicationsTable->addChild(new WuiLabel('appdeps' . $row, array('label' => $appDepListStr)), $row, 4);
                            }
                            $wuiDomainApplicationsTable->addChild($wuiDomainApplicationsToolbar[$row], $row, 3);
                        }
                        $row++;
                    }
                    $applicationsQuery->moveNext();
                }
                $xmlDef = '<horizgroup>
              <children>

                <button>
                  <args>
                    <themeimage>buttonok</themeimage>
                    <label type="encoded">' . urlencode($this->_localeCatalog->getStr('enable_all_applications.button')) . '</label>
                    <horiz>true</horiz>
                    <action type="encoded">' . urlencode(\Innomatic\Wui\Dispatch\WuiEventsCall::buildEventsCallString('', array(array('view', 'domainapplications', array('domainid' => $eventData['domainid'])), array('action', 'activateallapplications', array('domainid' => $eventData['domainid']))))) . '</action>
                  </args>
                </button>

                <button>
                  <args>
                    <themeimage>buttoncancel</themeimage>
                    <label type="encoded">' . urlencode($this->_localeCatalog->getStr('disable_all_applications.button')) . '</label>
                    <horiz>true</horiz>
                    <needconfirm>true</needconfirm>
                    <confirmmessage type="encoded">' . urlencode($this->_localeCatalog->getStr('disable_all_applications.confirm')) . '</confirmmessage>
                    <action type="encoded">' . urlencode(\Innomatic\Wui\Dispatch\WuiEventsCall::buildEventsCallString('', array(array('view', 'domainapplications', array('domainid' => $eventData['domainid'])), array('action', 'deactivateallapplications', array('domainid' => $eventData['domainid']))))) . '</action>
                  </args>
                </button>

              </children>
            </horizgroup>';
                $wuiMainVGroup = new WuiVertgroup('');
                $wuiMainVGroup->addChild($wuiDomainApplicationsTable);
                $wuiMainVGroup->addChild(new WuiHorizBar(''));
                $wuiMainVGroup->addChild(new WuiXml('', array('definition' => $xmlDef)));
                $this->wuiMainframe->addChild($wuiMainVGroup);
            }
        }
        $this->wuiTitlebar->mArgs['title'] .= ' - ' . $domainData['domainid'] . ' (' . $domainData['domainname'] . ') - ' . $this->_localeCatalog->getStr('domainapplications_title');
    }
Example #4
0
    $uri = dirname(\Innomatic\Webapp\WebAppContainer::instance('\\Innomatic\\Webapp\\WebAppContainer')->getProcessor()->getRequest()->getRequestURI());
    $wuiPage = new WuiPage('page', array('title' => $innomaticLocale->getStr('innomaticsetup_title'), 'javascript' => "parent.location.href='" . $uri . "'"));
    $wuiPage->addChild($wuiMainVertGroup);
    $wui->addChild($wuiPage);
    $wui->render();
} else {
    // System check
    //
    if (!file_exists($container->getHome() . 'core/temp/setup_systemchecked')) {
        $wuiPage = new WuiPage('page', array('title' => $innomaticLocale->getStr('innomaticsetup_title')));
        $systemok = true;
        $row = 0;
        @touch($container->getHome() . 'core/temp/setup_checkingsystem', time());
        $wuiTitleBar->mArgs['title'] .= ' - ' . $innomaticLocale->getStr('systemcheck_title');
        $headers = array();
        $wui_info_table = new WuiTable('sysinfotable', array('headers' => $headers));
        // Required features
        // PHP version check
        //
        $row = 0;
        if (version_compare(phpversion(), '5.4.0', '>')) {
            $ball = $wuiPage->mThemeHandler->mStyle['greenball'];
            $check_result = sprintf($innomaticLocale->getStr('php_available_label'), phpversion());
        } else {
            $ball = $wuiPage->mThemeHandler->mStyle['redball'];
            $check_result = sprintf($innomaticLocale->getStr('php_not_available_label'), phpversion());
            $systemok = false;
        }
        $wui_info_table->addChild(new WuiLabel('required' . $row, array('label' => $innomaticLocale->getStr('required_label'))), $row, 0);
        $wui_info_table->addChild(new WuiImage('status' . $row, array('imageurl' => $ball)), $row, 1);
        $wui_info_table->addChild(new WuiLabel('shared' . $row, array('label' => $innomaticLocale->getStr('php_test_label'))), $row, 2);
 public function viewDefault($eventData)
 {
     // Filtering
     if (isset($eventData['filter'])) {
         // if ($eventData['filter_projectid'] != 0)
         $search_keys['username'] = $eventData['username'];
         // Username
         $username_filter_sk = new WuiSessionKey('username_filter', array('value' => $eventData['username']));
         $search_keys['completename'] = $eventData['completename'];
         // completename
         $completename_filter_sk = new WuiSessionKey('completename_filter', array('value' => $eventData['completename']));
         $search_keys['email'] = $eventData['email'];
         // email
         $email_filter_sk = new WuiSessionKey('email_filter', array('value' => $eventData['email']));
     } else {
         $username_filter_sk = new WuiSessionKey('username_filter');
         if (strlen($username_filter_sk->mValue) and $username_filter_sk->mValue != 0) {
             $search_keys['username'] = $username_filter_sk->mValue;
         }
         $eventData['username'] = $username_filter_sk->mValue;
         $completename_filter_sk = new WuiSessionKey('completename_filter');
         if (strlen($completename_filter_sk->mValue) and $completename_filter_sk->mValue != 0) {
             $search_keys['completename'] = $completename_filter_sk->mValue;
         }
         $eventData['completename'] = $completename_filter_sk->mValue;
         $email_filter_sk = new WuiSessionKey('email_filter');
         if (strlen($email_filter_sk->mValue) and $email_filter_sk->mValue != 0) {
             $search_keys['email'] = $email_filter_sk->mValue;
         }
         $eventData['email'] = $email_filter_sk->mValue;
     }
     $where = array();
     if (isset($eventData['username']) and !empty($eventData['username'])) {
         $where[] = "username LIKE '%" . $eventData['username'] . "%' ";
     }
     if (isset($eventData['completename']) and !empty($eventData['completename'])) {
         $where[] = "fname LIKE '%" . $eventData['completename'] . "%' OR lname LIKE '%" . $eventData['completename'] . "%' ";
     }
     if (isset($eventData['email']) and !empty($eventData['email'])) {
         $where[] = "email LIKE '%" . $eventData['email'] . "%' ";
     }
     $usersQuery = $this->innomaticContainer->getCurrentDomain()->getDataAccess()->execute('SELECT id, username, fname, lname, email, groupid, disabled
         FROM domain_users ' . (!empty($where) ? "WHERE " . implode("OR ", $where) : '') . ' ORDER BY username');
     $profQuery = $this->innomaticContainer->getCurrentDomain()->getDataAccess()->execute('SELECT id,groupname FROM domain_users_groups ORDER BY groupname');
     $profiles = array();
     while (!$profQuery->eof) {
         $profData = $profQuery->getFields();
         $profiles[$profData['id']] = $profData['groupname'];
         $profQuery->moveNext();
     }
     $wuiVGroup = new WuiVertgroup('vgroup');
     $wuiVGroup->addChild(new WuiLabel('filter', array('bold' => true, 'label' => $this->localeCatalog->getStr('filter_label'))));
     $formEventsCall = new WuiEventsCall();
     $formEventsCall->addEvent(new WuiEvent('view', 'default', array()));
     $wuiForm = new WuiForm('usersform', array('action' => $formEventsCall->getEventsCallString()));
     $wuiHGroup = new WuiHorizgroup('hgroup', array('width' => '0%'));
     $wuiHGroup->addChild(new WuiLabel('username', array('label' => $this->localeCatalog->getStr('username_header') . ':')));
     $wuiHGroup->addChild(new WuiString('username', array('disp' => 'view', 'value' => isset($eventData['username']) ? $eventData['username'] : '')));
     $wuiHGroup->addChild(new WuiLabel('completename', array('label' => $this->localeCatalog->getStr('completename_header') . ':')));
     $wuiHGroup->addChild(new WuiString('completename', array('disp' => 'view', 'value' => isset($eventData['completename']) ? $eventData['completename'] : '')));
     $wuiHGroup->addChild(new WuiLabel('email', array('label' => $this->localeCatalog->getStr('email_header') . ':')));
     $wuiHGroup->addChild(new WuiString('email', array('disp' => 'view', 'value' => isset($eventData['email']) ? $eventData['email'] : '')));
     $wuiSearchButton = new WuiButton('searchbutton', array('label' => $this->localeCatalog->getStr('filter_button'), 'themeimage' => 'zoom', 'themeimagetype' => 'mini', 'horiz' => 'true', 'formsubmit' => 'usersform', 'action' => \Innomatic\Wui\Dispatch\WuiEventsCall::buildEventsCallString('', array(array('view', 'default', array('filter' => 'true'))))));
     $wuiHGroup->addChild($wuiSearchButton);
     $wuiEraseFilter = new WuiButton('searchbutton', array('label' => $this->localeCatalog->getStr('erasefilter_button'), 'themeimage' => 'buttoncancel', 'themeimagetype' => 'mini', 'horiz' => 'true', 'frame' => 'false', 'formsubmit' => 'usersform', 'action' => \Innomatic\Wui\Dispatch\WuiEventsCall::buildEventsCallString('', array(array('view', 'default', array()), array('action', 'erasefilter', array())))));
     $wuiHGroup->addChild($wuiEraseFilter);
     $wuiForm->addChild($wuiHGroup);
     $wuiVGroup->addChild($wuiForm);
     $wuiVGroup->addChild(new WuiHorizBar('horizbar1'));
     $wuiVGroup->addChild(new WuiLabel('filter', array('bold' => true, 'label' => $this->localeCatalog->getStr('users_title'))));
     if ($usersQuery->getNumberRows()) {
         $headers[0]['label'] = $this->localeCatalog->getStr('status_header');
         $headers[1]['label'] = $this->localeCatalog->getStr('username_header');
         $headers[2]['label'] = $this->localeCatalog->getStr('completename_header');
         $headers[3]['label'] = $this->localeCatalog->getStr('email_header');
         $headers[4]['label'] = $this->localeCatalog->getStr('userprofilename_header');
         $row = 0;
         $wuiUsersTable = new WuiTable('userstable', array('headers' => $headers, 'rowsperpage' => '25', 'pagesactionfunction' => 'users_list_action_builder', 'pagenumber' => (is_array($eventData) and isset($eventData['userspage'])) ? $eventData['userspage'] : 1));
         while (!$usersQuery->eof) {
             $userData = $usersQuery->getFields();
             if ($userData['disabled'] == $this->innomaticContainer->getCurrentDomain()->getDataAccess()->fmttrue) {
                 $enabled = false;
             } else {
                 $enabled = true;
             }
             $chDataAction[$row] = new WuiEventsCall();
             $chDataAction[$row]->addEvent(new WuiEvent('view', 'edituser', array('userid' => $userData['id'])));
             if ($enabled) {
                 $wuiUsersTable->addChild(new WuiImage('status' . $row, array('imageurl' => $this->wuiMainframe->mThemeHandler->mStyle['greenball'])), $row, 0, 'center');
             } else {
                 $wuiUsersTable->addChild(new WuiImage('status' . $row, array('imageurl' => $this->wuiMainframe->mThemeHandler->mStyle['redball'])), $row, 0, 'center');
             }
             $wuiUsersTable->addChild(new WuiLink('usernamelabel' . $row, array('label' => $userData['username'], 'link' => $chDataAction[$row]->getEventsCallString())), $row, 1);
             $wuiUsersTable->addChild(new WuiLabel('completenamelabel' . $row, array('label' => strcmp($userData['username'], $this->innomaticContainer->getCurrentDomain()->getDomainId()) != 0 ? $userData['lname'] . ' ' . $userData['fname'] : $this->localeCatalog->getStr('superuser_label'))), $row, 2);
             $wuiUsersTable->addChild(new WuiLabel('emaillabel' . $row, array('label' => $userData['email'])), $row, 3);
             $wuiUsersTable->addChild(new WuiLabel('userprofilelabel' . $row, array('label' => ($userData['groupid'] != '0' and strlen($userData['groupid'])) ? $profiles[$userData['groupid']] : $this->localeCatalog->getStr('noprofileid_label'))), $row, 4);
             if ($this->innomaticContainer->getCurrentUser()->hasPermission('edit_password_all')) {
                 $wuiUserToolbar[$row] = new WuiHorizgroup('usertoolbar' . $row);
                 $chPasswdAction[$row] = new WuiEventsCall();
                 $chPasswdAction[$row]->addEvent(new WuiEvent('view', 'chpassword', array('userid' => $userData['id'])));
                 $wuiChPasswdButton[$row] = new WuiButton('chpasswdbutton' . $row, array('label' => $this->localeCatalog->getStr('chpasswd_label'), 'themeimage' => 'documenttext', 'themeimagetype' => 'mini', 'horiz' => 'true', 'action' => $chPasswdAction[$row]->getEventsCallString()));
                 $wuiUserToolbar[$row]->addChild($wuiChPasswdButton[$row]);
                 $wuiChDataButton[$row] = new WuiButton('chdatabutton' . $row, array('label' => $this->localeCatalog->getStr('chdata_label'), 'themeimage' => 'documenttext', 'themeimagetype' => 'mini', 'horiz' => 'true', 'action' => $chDataAction[$row]->getEventsCallString()));
                 $wuiUserToolbar[$row]->addChild($wuiChDataButton[$row]);
                 if (!\Domain\User\User::isAdminUser($userData['username'], $this->innomaticContainer->getCurrentDomain()->domainid)) {
                     $removeAction[$row] = new WuiEventsCall();
                     $removeAction[$row]->addEvent(new WuiEvent('view', 'deleteuser', array('userid' => $userData['id'])));
                     $enableAction = new WuiEventsCall();
                     $enableAction->addEvent(new WuiEvent('action', $enabled ? 'disableuser' : 'enableuser', array('userid' => $userData['id'])));
                     $wuiEnableButton = new WuiButton('enablebutton' . $row, array('label' => $this->localeCatalog->getStr($enabled ? 'disableuser_label' : 'enableuser_label'), 'themeimage' => $enabled ? 'lock' : 'unlock', 'themeimagetype' => 'mini', 'horiz' => 'true', 'action' => $enableAction->getEventsCallString()));
                     $wuiUserToolbar[$row]->addChild($wuiEnableButton);
                     $wuiRemoveButton[$row] = new WuiButton('removebutton' . $row, array('label' => $this->localeCatalog->getStr('removeuser_label'), 'themeimage' => 'trash', 'themeimagetype' => 'mini', 'horiz' => 'true', 'action' => $removeAction[$row]->getEventsCallString()));
                     $wuiUserToolbar[$row]->addChild($wuiRemoveButton[$row]);
                 }
                 $wuiUsersTable->addChild($wuiUserToolbar[$row], $row, 5);
             }
             $usersQuery->moveNext();
             $row++;
         }
         $wuiVGroup->addChild($wuiUsersTable);
     }
     $this->wuiMainframe->addChild($wuiVGroup);
     $this->wuiTitlebar->mArgs['title'] .= ' - ' . $this->localeCatalog->getStr('users_title');
 }