Пример #1
0
}
$jUI->add(new JUI\Heading("Gameserver"));
if ($pluginManager->isInstalled('plg_ts3viewer')) {
    $ts3widget = new JUI\Widget('plg_ts3viewer', 'settings');
    $jUI->add($ts3widget);
    $jUI->newline();
    $jUI->newline();
}
if ($pluginManager->isInstalled('plg_mcviewer')) {
    $mcwidget = new JUI\Widget('plg_mcviewer', 'settings');
    $jUI->add($mcwidget);
    $jUI->newline();
    $jUI->newline();
}
/* CSGO-Server */
$csgoHeading = new JUI\Heading("CS:GO");
$csgoHeading->setSmall(TRUE);
$jUI->add($csgoHeading);
$table = new JUI\Table();
$row = new JUI\Table\Row();
$row->addColumn("Status:");
ob_start();
passthru('sudo /var/www/sh/csgostatus.sh');
$status = ob_get_clean();
if (strpos($status, "csgo") === false) {
    $csgoStatus = new JUI\Text("Server offline");
    $csgoStatus->setColor("FF0000");
} else {
    $csgoStatus = new JUI\Text("Server offline");
    $csgoStatus->setColor("FF0000");
}
Пример #2
0
}
$bgcolor->setLabel("Hintergrundfarbe: ");
$colorContainer->add($bgcolor);
$colorContainer->nline(2);
$submit = new JUI\Button("Speichern", TRUE);
$colorContainer->add($submit);
$reset = new JUI\Button("Zurücksetzen");
$reset->setClick(new JUI\Click(JUI\Click::openPlugin, $pluginManager, 'home', 'resetColors'));
$colorContainer->add($reset);
$jUI->add($colorContainer);
$authtokenContainer = new JUI\Container();
$authtokenContainer->setBackgroundColor('#E8E8E8');
$authtokenContainer->setPadding(20);
$authtokenContainer->setMarginTop(15);
$authtokenContainer->setMarginBottom(15);
$headingAuthtokens = new JUI\Heading('Authtokens');
$headingAuthtokens->setSmall();
$authtokenContainer->add($headingAuthtokens);
$deleteAuthtokens = new JUI\Button('Alle Authtokens löschen');
$deleteAuthtokens->setClick(new JUI\Click(JUI\Click::openPlugin, $pluginManager, 'authtoken', 'removeAll'));
$authtokenContainer->add($deleteAuthtokens);
$list = new JUI\ListView();
$authtokens = $loginManager->getAuthtokens();
if (!empty($authtokens)) {
    foreach ($authtokens as $authtoken) {
        if (!empty($authtoken['name'])) {
            $name = $authtoken['name'];
        } else {
            $name = "kein Name";
        }
        $click = new JUI\Click(JUI\Click::openPlugin, $pluginManager, 'authtoken', $authtoken['id']);