$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"); } $csgoStatus->setAlign(JUI\Text::RIGHT); $row->addColumn($csgoStatus); $table->addRow($row); $jUI->add($table); if ($loginManager->isAllowed(LoginManager::STOP_SERVER)) { $csgoStart = new JUI\Button("CS:GO Server starten"); $csgoStart->setClick(new JUI\Click(JUI\Click::openPlugin, $pluginManager, 'start', 'csgo')); $jUI->add($csgoStart); $csgoStop = new JUI\Button("CS:GO Server stoppen"); $csgoStop->setClick(new JUI\Click(JUI\Click::openPlugin, $pluginManager, 'stop', 'csgo')); $jUI->add($csgoStop); $csgoUpdate = new JUI\Button("CS:GO Server updaten"); $csgoUpdate->setClick(new JUI\Click(JUI\Click::openPlugin, $pluginManager, 'update', 'csgo')); $jUI->add($csgoUpdate); } $jUI->newline(); $jUI->newline(); /* ARK-Server */
<?php $command = $pluginManager->getCommand(0); if (!empty($command) && is_numeric($command)) { require_once $pluginManager->getController('tools'); $contact = $pluginManager->databaseManager->getValues(array('id' => array('value' => $command)), 1); if (!empty($contact) && is_array($contact)) { $name = $contact['lastname'] . ', ' . $contact['firstname']; $jUI->add(new JUI\Heading($name)); $table = new JUI\Table(); if (!empty($contact['telephone'])) { $table->addRow(nameValueRow('Telefon: ', $contact['telephone'])); } if (!empty($contact['mobile'])) { $table->addRow(nameValueRow('Mobil: ', $contact['mobile'])); } if (!empty($contact['email'])) { $table->addRow(nameValueRow('E-Mail: ', $contact['email'])); } if (!empty($contact['address'])) { $addressArray = json_decode($contact['address']); $addressString = ''; if (!empty($addressArray)) { if (!empty($addressArray->address)) { $addressString .= $addressArray->address . PHP_EOL; } if (!empty($addressArray->zipcode)) { $addressString .= $addressArray->zipcode . ' '; } if (!empty($addressArray->city)) { $addressString .= $addressArray->city . PHP_EOL;
$table2->addRow($row); $jUI->add($table2); // END ALL $jUI->hline(); $jUI->add($table); $jUI->nline(); $table3 = new JUI\Table(); $table3->setWidth('100%'); $buttonRow = new JUI\Table\Row(); if ($month > 1) { $buttonNext = new JUI\Button(date('m Y', $selectedEnd + 3600)); $buttonNext->setClick(new JUI\Click(JUI\Click::openPlugin, $pluginManager, 'overview', $month - 1)); $buttonNext->setWidth('100%'); $buttonRow->addColumn($buttonNext); } else { if ($month == 1) { $buttonNext = new JUI\Button("Zeige alles"); $buttonNext->setClick(new JUI\Click(JUI\Click::openPlugin, $pluginManager, 'overview')); $buttonNext->setWidth('100%'); $buttonRow->addColumn($buttonNext); } } $buttonLast = new JUI\Button(date('m Y', $selectedStart - 3600)); $buttonLast->setClick(new JUI\Click(JUI\Click::openPlugin, $pluginManager, 'overview', $month + 1)); $buttonLast->setWidth('100%'); $buttonRow->addColumn($buttonLast); $table3->addRow($buttonRow); $jUI->add($table3); ?>
function showServerLog($jUI, $id) { global $logManager; global $pluginManager; $jUI->add(new JUI\Heading("Eintrag: " . $id)); $log = $logManager->getLog($id); $table = new JUI\Table(); $row4 = new JUI\Table\Row(); $row4->addColumn("Plugin"); if (empty($log['user'])) { $statusText = new JUI\Text("Warnung"); $statusText->setColor('FF0000'); } else { if ($log['plugin'] == "plg_serversettings") { $statusText = new JUI\Text("Info"); $statusText->setColor('00008B'); } else { $statusText = new JUI\Text("Normal"); } } $row4->addColumn($statusText); $table->addRow($row4); $row1 = new JUI\Table\Row(); $row1->addColumn("Zeit"); $row1->addColumn(date("Y-m-d H:i:s", $log['timestamp'])); $table->addRow($row1); $row3 = new JUI\Table\Row(); $row3->addColumn("Plugin"); $pluginText = new JUI\Text($log['plugin']); $pluginText->setAppearance(JUI\Text::BOLD); $row3->addColumn($pluginText); $table->addRow($row3); $row2 = new JUI\Table\Row(); $row2->addColumn("Nachricht"); $row2->addColumn($log['text']); $table->addRow($row2); $jUI->add($table); $delete = new JUI\Button('Eintrag löschen'); $delete->setClick(new JUI\Click(JUI\Click::openPlugin, $pluginManager, 'logs', 'server/' . $id . '/delete')); $jUI->add($delete); }