Пример #1
0
    }
    $forceIP = true;
} else {
    $forceIP = false;
}
if (is_null($hostId) || !$ip) {
    $oPage->container->addItem(endRouteForm($host));
} else {
    $defaultContactId = $oUser->getDefaultContact()->getId();
    $defaultContactName = $oUser->getDefaultContact()->getName();
    $hgName = sprintf(_('Cesta k %s'), $host->getName());
    $hostGroup = new IEHostgroup($hgName);
    if ($hostGroup->getId()) {
    } else {
        $hostGroup->setUpUser($oUser);
        $hostGroup->setName($hgName);
    }
    $listing = new EaseHtmlOlTag();
    $infopanel = $oPage->container->addItem(new EaseTWBPanel($hostGroup->getName(), 'info', $listing));
    $trace = array();
    //??? $mtr = shell_exec('mtr -4 --no-dns -c 1 -p   ' . $ip);
    $mtr = shell_exec('traceroute -n -w 1 ' . $ip);
    $mtrlines = explode("\n", $mtr);
    foreach ($mtrlines as $mtrline) {
        $linea = explode(' ', trim($mtrline));
        if ($linea[0] == 'traceroute' || !isset($linea[2])) {
            continue;
        }
        if ($linea[2] != '*') {
            $trace[] = $linea[2];
        }
Пример #2
0
                $oUser->addStatusMessage(_('Mailový kontakt byl založen'), 'success');
            } else {
                $oUser->addStatusMessage(_('Mailový kontakt nebyl založen'), 'warning');
            }
            $contactGroup = new IEContactgroup();
            $contactGroup->setData(array('contactgroup_name' => _('Skupina') . '_' . $login, 'alias' => _('Skupina') . '_' . $login, 'generate' => true, $contactGroup->userColumn => $userID));
            $contactGroup->addMember('members', $contactID, $login);
            $contactGroup->addMember('members', $mailID, $contact->getName());
            $cgID = $contactGroup->saveToMySQL();
            if ($cgID) {
                $oUser->addStatusMessage(_('Prvotní kontaktní skupina byla založena'), 'success');
            } else {
                $oUser->addStatusMessage(_('Prvotní kontaktní skupina nebyla založena'), 'warning');
            }
            $hostGroup = new IEHostgroup();
            $hostGroup->setName($newOUser->getUserLogin());
            $hostGroup->setDataValue('alias', _('Výchozí skupina') . ' ' . $newOUser->getUserLogin());
            $hostGroup->setDataValue('generate', true);
            $hostGroup->setUpUser($newOUser);
            $hostGroup->insertToMySQL();
            $oPage->redirect('wizard-host.php');
            exit;
        } else {
            $oUser->addStatusMessage(_('Zápis do databáze se nezdařil!'), 'error');
            $email = $oPage->addItem(new EaseMail(constant('SEND_ORDERS_TO'), 'Registrace uzivatel se nezdařila'));
            $email->addItem(new EaseHtmlDivTag('Fegistrace', $oPage->PrintPre($CustomerData)));
            $email->send();
        }
    }
}
$oPage->addItem(new IEPageTop(_('Registrace')));