예제 #1
0
{
    global $gPage_status, $gLocale;
    $clipping = new InnoworkClipping(\Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getDataAccess(), \Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getCurrentDomain()->getDataAccess(), $eventData['id']);
    $clipping->RemoveItem($eventData['itemtype'], $eventData['itemid']);
    //    if ( $clipping->Edit( $eventData ) ) $gPage_status = $gLocale->getStr( 'clipping_updated.status' );
    //    else $gPage_status = $gLocale->getStr( 'clipping_not_updated.status' );
}
$gAction_disp->Dispatch();
// ----- Main dispatcher -----
//
$gMain_disp = new WuiDispatcher('view');
function clippings_list_action_builder($pageNumber)
{
    return WuiEventsCall::buildEventsCallString('', array(array('view', 'default', array('pagenumber' => $pageNumber))));
}
$gMain_disp->addEvent('default', 'main_default');
function main_default($eventData)
{
    global $gLocale, $gPage_title, $gXml_def, $gPage_status, $gToolbars, $gInnowork_core, $customers;
    $innowork_clippings = new InnoworkClipping(\Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getDataAccess(), \Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getCurrentDomain()->getDataAccess());
    $search_results = $innowork_clippings->Search('', \Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getCurrentUser()->getUserId());
    $headers[1]['label'] = $gLocale->getStr('name.header');
    $headers[2]['label'] = $gLocale->getStr('description.header');
    $gXml_def = '
    <vertgroup>
      <children>
    
        <table><name>clippings</name>
          <args>
            <headers type="array">' . WuiXml::encode($headers) . '</headers>
            <rowsperpage>15</rowsperpage>
예제 #2
0
                $wuiMainStatus->mArgs['status'] = $innomaticLocale->getStr('passwordchanged_status');
            } else {
                $wuiMainStatus->mArgs['status'] = $innomaticLocale->getStr('wrongoldpassword_status');
            }
        } else {
            $wuiMainStatus->mArgs['status'] = $innomaticLocale->getStr('newpasswordisempty_status');
        }
    } else {
        $wuiMainStatus->mArgs['status'] = $innomaticLocale->getStr('newpasswordnomatch_status');
    }
}
$actionDispatcher->Dispatch();
// Main dispatcher
//
$viewDispatcher = new WuiDispatcher('view');
$viewDispatcher->addEvent('default', 'main_default');
function main_default($eventData)
{
    global $wuiMainFrame, $innomaticLocale, $wuiTitleBar;
    $wuiGrid = new WuiGrid('grid', array('rows' => '3', 'cols' => '2'));
    $wuiGrid->addChild(new WuiLabel('oldpasswordlabel', array('label' => $innomaticLocale->getStr('rootpasswordold_label'))), 0, 0);
    $wuiGrid->addChild(new WuiString('oldpassword', array('disp' => 'action', 'password' => 'true')), 0, 1);
    $wuiGrid->addChild(new WuiLabel('newpasswordalabel', array('label' => $innomaticLocale->getStr('rootpassworda_label'))), 1, 0);
    $wuiGrid->addChild(new WuiString('newpassworda', array('disp' => 'action', 'password' => 'true')), 1, 1);
    $wuiGrid->addChild(new WuiLabel('newpasswordblabel', array('label' => $innomaticLocale->getStr('rootpasswordb_label'))), 2, 0);
    $wuiGrid->addChild(new WuiString('newpasswordb', array('disp' => 'action', 'password' => 'true')), 2, 1);
    $wuiVGroup = new WuiVertgroup('vertgroup', array('align' => 'center'));
    $wuiVGroup->addChild($wuiGrid);
    $wuiVGroup->addChild(new WuiSubmit('submit', array('caption' => $innomaticLocale->getStr('rootpasschange_submit'))));
    $formEventsCall = new WuiEventsCall();
    $formEventsCall->addEvent(new WuiEvent('view', 'default', ''));
예제 #3
0
function action_restore_item($eventData)
{
    global $gLocale, $gPage_status, $innowork_core;
    $summaries = $innowork_core->getSummaries();
    $class_name = $summaries[$eventData['itemtype']]['classname'];
    if (!class_exists($class_name)) {
        return false;
    }
    $tmp_class = new $class_name(\Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getDataAccess(), \Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getCurrentDomain()->getDataAccess(), $eventData['itemid']);
    $tmp_class->Restore();
    $gPage_status = $gLocale->getStr('item_restored.status');
}
$gAction_disp->Dispatch();
// Main dispatcher
$main_disp = new WuiDispatcher('view');
$main_disp->addEvent('default', 'main_search');
$main_disp->addEvent('search', 'main_search');
function main_search($eventData)
{
    global $gPage_content, $innowork_core, $gWui, $gPage_status, $gPage_title, $gLocale;
    require_once 'innowork/core/InnoworkItem.php';
    $summaries = $innowork_core->GetSummaries();
    $types[''] = $gLocale->getStr('alltypes.label');
    while (list($key, $val) = each($summaries)) {
        if ($val['searchable']) {
            $types[$key] = $val['label'];
        }
    }
    reset($summaries);
    if (!isset($eventData['restrictto'])) {
        $eventData['restrictto'] = InnoworkItem::SEARCH_RESTRICT_NONE;
예제 #4
0
    $tempLog = new \Innomatic\Logging\Logger(\Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getHome() . 'core/log/webservices.log');
    if ($tempLog->cleanLog()) {
        $gPageStatus = $gLocale->getStr('logcleaned_status');
    } else {
        $gPageStatus = $gLocale->getStr('lognotcleaned_status');
    }
}
$gActionDispatcher->Dispatch();
// ----- Main dispatcher -----
//
$gViewDispatcher = new WuiDispatcher('view');
function general_tab_builder($tab)
{
    return \Innomatic\Wui\Dispatch\WuiEventsCall::buildEventsCallString('', array(array('view', 'default', array('tab' => $tab))));
}
$gViewDispatcher->addEvent('default', 'main_default');
function main_default($eventData)
{
    global $gXmlDefinition, $gLocale, $gPageTitle;
    $main = new \Innomatic\Maintenance\MaintenanceHandler();
    $mainTime = $main->getLastMaintenanceTime();
    $tasks = $main->getTasksList();
    $tabs[0]['label'] = $gLocale->getStr('general_status.tab');
    $tabs[1]['label'] = $gLocale->getStr('general_report.tab');
    $tabs[2]['label'] = $gLocale->getStr('general_tasks.tab');
    $country = new \Innomatic\Locale\LocaleCountry(\Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getCountry());
    $dateArray = $country->getDateArrayFromUnixTimestamp($mainTime);
    $row = 0;
    $gXmlDefinition = '<vertgroup>
      <children>
예제 #5
0
    $keyring->RemoveKey($eventData['id']);
    $gStatus = $gLocale->getStr('removekey_removed.status');
}
$gActionDispatcher->Dispatch();
// Main dispatcher
//
$gViewDispatcher = new WuiDispatcher('view');
function applications_list_action_builder($pageNumber)
{
    return \Innomatic\Wui\Dispatch\WuiEventsCall::buildEventsCallString('', array(array('view', 'default', array('applicationspage' => $pageNumber))));
}
function applications_tab_action_builder($tab)
{
    return \Innomatic\Wui\Dispatch\WuiEventsCall::buildEventsCallString('', array(array('view', 'default', array('activetab' => $tab))));
}
$gViewDispatcher->addEvent('default', 'main_default');
function main_default($eventData)
{
    global $wuiMainFrame, $gLocale, $gPageContent;
    $gPageContent = new WuiVertgroup('apps');
    $applicationsQuery = \Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getDataAccess()->execute('SELECT * FROM applications ORDER BY category,appid');
    if ($applicationsQuery->getNumberRows() > 0) {
        $headers[1]['label'] = $gLocale->getStr('appid_header');
        $headers[2]['label'] = $gLocale->getStr('modauthor_header');
        $headers[3]['label'] = $gLocale->getStr('appversion_header');
        $headers[4]['label'] = $gLocale->getStr('appdate_header');
        $row = 0;
        $currentCategory = '';
        while (!$applicationsQuery->eof) {
            $tmpData = $applicationsQuery->getFields();
            if ($tmpData['category'] == '') {
예제 #6
0
        $acc = new \Innomatic\Webservices\WebServicesAccount($eventData['accountid']);
        $result = $acc->Update($eventData['name'], $eventData['host'], $eventData['port'], $eventData['path'], $eventData['username'], $eventData['password'], $eventData['proxy'], $eventData['proxyport']);
    }
    if ($result) {
        $wuiMainStatus->mArgs['status'] = $innomaticLocale->getStr('accountupdated_status');
    }
}
$actionDispatcher->Dispatch();
// Main dispatcher
//
$viewDispatcher = new WuiDispatcher('view');
function webservicesprofiles_list_action_builder($pageNumber)
{
    return \Innomatic\Wui\Dispatch\WuiEventsCall::buildEventsCallString('', array(array('view', 'default', array('webservicesprofilespage' => $pageNumber))));
}
$viewDispatcher->addEvent('default', 'main_default');
function main_default($eventData)
{
    global $innomaticLocale, $wuiMainFrame, $wuiTitleBar, $wuiMainStatus;
    $profilesQuery = \Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getDataAccess()->execute('SELECT id,profilename FROM webservices_profiles ORDER BY profilename');
    $profiles = array();
    while (!$profilesQuery->eof) {
        $profData = $profilesQuery->getFields();
        $profiles[$profData['id']] = $profData['profilename'];
        $profilesQuery->moveNext();
    }
    if (count($profiles)) {
        $headers[0]['label'] = $innomaticLocale->getStr('profilename_header');
        $row = 0;
        $wuiProfilesTable = new WuiTable('profilestable', array('headers' => $headers, 'rowsperpage' => '10', 'pagesactionfunction' => 'webservicesprofiles_list_action_builder', 'pagenumber' => isset($eventData['webservicesprofilespage']) ? $eventData['webservicesprofilespage'] : ''));
        while (list($id, $profileName) = each($profiles)) {
예제 #7
0
                $gPageStatus = $gLocale->getStr('wrongoldpassword_status');
                break;
        }
    } else {
        $gPageStatus = $gLocale->getStr('newpasswordnomatch_status');
    }
}
$gActionDispatcher->Dispatch();
// ----- Main dispatcher -----
//
$gViewDispatcher = new WuiDispatcher('view');
function default_tab_builder($tab)
{
    return \Innomatic\Wui\Dispatch\WuiEventsCall::buildEventsCallString('', array(array('view', 'default', array('tab' => $tab))));
}
$gViewDispatcher->addEvent('default', 'main_default');
function main_default($eventData)
{
    global $gXmlDefinition, $gLocale, $gPageTitle, $alertText;
    //$tabs[0]['label'] = $gLocale->getStr( 'currentactivities.tab' );
    $tabs[0]['label'] = $gLocale->getStr('accesslog.tab');
    $tabs[1]['label'] = $gLocale->getStr('loggedusers.tab');
    $tabs[2]['label'] = $gLocale->getStr('securitycheck.tab');
    $innomaticSecurity = new \Innomatic\Security\SecurityManager();
    $securityCheck = $innomaticSecurity->securityCheck();
    if ($securityCheck['rootpasswordcheck'] == false or $securityCheck['rootdapasswordcheck'] == false or count($securityCheck['domainswithunsecuredbpassword']) or count($securityCheck['unsecurelocalaccounts']) or count($securityCheck['unsecurewebservicesprofiles']) or count($securityCheck['unsecurewebservicesaccounts'])) {
        $alertText = $gLocale->getStr('security_check_failed_status');
    }
    $loggedUsers = $innomaticSecurity->getLoggedSessions();
    $rootSessions = $usersSessions = array();
    foreach ($loggedUsers['root'] as $rootSession) {
예제 #8
0
$wui->loadWidget('table');
$wui->loadWidget('text');
$wui->loadWidget('titlebar');
$wui->loadWidget('vertframe');
$wui->loadWidget('vertgroup');
$wui->loadWidget('progressbar');
$wuiPage = new WuiPage('page', array('title' => $innomaticLocale->getStr('innomaticsetup_title')));
$wuiMainVertGroup = new WuiVertgroup('mainvertgroup');
$wuiTitleBar = new WuiTitleBar('titlebar', array('title' => $innomaticLocale->getStr('innomaticsetup_title')));
$wuiMainVertGroup->addChild($wuiTitleBar);
$wui_mainframe1 = new WuiHorizframe('mainframe', array('width' => '100%'));
$wuiMainFrame = new WuiVertgroup('mainvertgroup2');
// Pass dispatcher
//
$actionDispatcher = new WuiDispatcher('action');
$actionDispatcher->addEvent('checksystem', 'pass_checksystem');
function pass_checksystem($eventData)
{
    global $innomaticLocale;
    $log = \Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getLogger();
    \Innomatic\Setup\InnomaticSetup::checksystem($eventData, $log);
}
$actionDispatcher->addEvent('installfiles', 'pass_installfiles');
function pass_installfiles($eventData)
{
    global $innomaticLocale, $log;
    $log = \Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getLogger();
    \Innomatic\Setup\InnomaticSetup::installfiles($eventData, $log);
}
$actionDispatcher->addEvent('setedition', 'pass_setedition');
function pass_setedition($eventData)
예제 #9
0
$gAction_disp = new WuiDispatcher('action');
$gAction_disp->addEvent('empty_trashcan', 'action_empty_trashcan');
function action_empty_trashcan($eventData)
{
    global $gLocale, $gPage_status, $innowork_core;
    $innowork_core->EmptyTrashcan();
    $gPage_status = $gLocale->getStr('trashcan_cleaned.status');
}
$gAction_disp->Dispatch();
// Main dispatcher
$main_disp = new WuiDispatcher('view');
function main_tab_action_handler($tab)
{
    return WuiEventsCall::buildEventsCallString('', array(array('view', 'default', array('maintab' => $tab))));
}
$main_disp->addEvent('default', 'main_default');
function main_default($eventData)
{
    global $gXml_def, $innowork_core, $gLocale, $gWui, $gPage_status, $gPage_title;
    $summaries = $innowork_core->GetSummaries();
    $types[''] = $gLocale->getStr('alltypes.label');
    while (list($key, $val) = each($summaries)) {
        if ($val['searchable']) {
            $types[$key] = $val['label'];
        }
    }
    reset($summaries);
    $tab_labels[0]['label'] = $gLocale->getStr('defacls.tab');
    $gXml_def = '
<vertgroup>
  <children>