$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 */ if ($pluginManager->isInstalled('plg_arkviewer')) { $ts3widget = new JUI\Widget('plg_arkviewer', 'settings'); $jUI->add($ts3widget); } $jUI->newline(); $jUI->newline(); if ($loginManager->isAllowed(LoginManager::MODIFY_USERS)) { $jUI->add(new JUI\Heading("Benutzer")); $addUser = new JUI\Button("Benutzer erstellen"); $addUser->setClick(new JUI\Click(JUI\Click::openPlugin, $pluginManager, 'user', 'create')); $jUI->add($addUser); $users = $pluginManager->getUserManager()->getUserList(); $userList = new JUI\ListView(); foreach ($users as $user) { $userClick = new JUI\Click(JUI\Click::openPlugin, $pluginManager, 'user', $user['id']); $userList->addItem($user['username'], $userClick); } $jUI->add($userList); }
<?php $id = $pluginManager->getCommand(0); $password = $pluginManager->getCommand(1); if (!empty($id)) { $value = $pluginManager->databaseManager->getValues(array("id" => array("operator" => "=", "value" => $id)), 1); if (!empty($value['password']) && !empty($password)) { if ($value['password'] != $password) { $pluginManager->redirect($pluginManager, 'password', $id); } } else { if (!empty($value['password']) && empty($password)) { $pluginManager->redirect($pluginManager, 'password', $id); } } } else { $pluginManager->redirect($pluginManager); } $jUI->add(new JUI\Heading("Notiz - Einstellungen")); $delete = new JUI\Button("Notiz löschen"); $delete->setClick(new JUI\Click(JUI\Click::openPlugin, $pluginManager, 'remove', $id . '/' . $password)); $jUI->add($delete);
$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']); $list->addItem($name, $click); } }
<?php require_once $pluginManager->getController('tools'); if (!empty($pluginManager->getCommand(0)) && $pluginManager->getCommand(0) == "reload") { FileManager::updateUserFileList(); } $jUI->add(new JUI\Heading('Musik')); $reload = new JUI\Button("Musik aktualisieren"); $reload->setClick(new JUI\Click(JUI\Click::openPlugin, $pluginManager, "home", "reload")); $jUI->add($reload); $remote = new JUI\Button("Musik-Remote öffnen"); $remote->setClick(new JUI\Click(JUI\Click::openPlugin, $pluginManager, "remote")); $jUI->add($remote); $audio = $pluginManager->fileManager->getAudioList(); if (!empty($audio) && is_array($audio)) { $list = new JUI\ListView(); $musicArray = null; foreach ($audio as $path) { if (is_string($path) && $pluginManager->fileManager->fileExists($path, TRUE, FileManager::FILESYSTEM_PRIVATE)) { $name = FileManager::getBaseName($path); $array['name'] = $name; $array['click'] = new JUI\Click(JUI\Click::openMedia, 'music', $path); $array['longclick'] = new JUI\Click(JUI\Click::openPlugin, $pluginManager, 'remote', encode($path)); if (empty($musicArray[strtolower($name)])) { $musicArray[strtolower($name)] = $array; } else { $musicArray[strtolower($name) . '_' . count($musicArray)] = $array; } } } ksort($musicArray);
if (empty($send)) { $files = json_decode($pluginManager->getTemporary('files')); $jUI->add(new JUI\Heading("Wollen sie die folgende/n Datei/en senden?")); $pluginManager->getFileManager(); if (!empty($files) && is_array($files)) { foreach ($files as $file) { $hash = $pluginManager->fileManager->getImageHash($file, FileManager::FILESYSTEM_PLUGIN_PUBLIC); if (!empty($hash)) { $jUI->add(new JUI\Image($hash)); } } } $yes = new JUI\Button("Ja"); $yes->setClick(new JUI\Click(JUI\Click::openPlugin, $pluginManager, 'user', $recipient . '/send')); $jUI->add($yes); $no = new JUI\Button("Nein"); $no->setClick(new JUI\Click(JUI\Click::openPlugin, $pluginManager, 'user', $recipient . '/delete')); $jUI->add($no); } else { if ($send == "send") { $pluginManager->getFileManager(); $files = json_decode($pluginManager->getTemporary('files')); if (!empty($files) && is_array($files)) { foreach ($files as $file) { $fileNew = uniqid() . '.' . $pluginManager->fileManager->getExtension($file); $pluginManager->fileManager->move($file, $fileNew, FileManager::FILESYSTEM_PLUGIN_PUBLIC); $pluginManager->fileManager->resizeImage($fileNew, FileManager::FILESYSTEM_PLUGIN_PUBLIC, 'thumb/' . $fileNew, "300", "300"); $pluginManager->databaseManager->insertValue(array("text" => array("value" => $fileNew), "sender" => array("value" => $loginManager->getId()), "recipient" => array("value" => $recipient), "type" => array("value" => '1'))); $pluginManager->databaseManager->insertValue(array("text" => array("value" => $fileNew), "sender" => array("value" => $loginManager->getId()), "recipient" => array("value" => $recipient), "type" => array("value" => '1'), "user" => array("value" => $recipient))); $pNotification = new Notification($loginManager->getUsername() . " hat ihnen ein Bild geschickt.", "Bild von " . $loginManager->getUsername(), time() + 86400); $pNotification->setIcon($pluginManager->getImage('image.png'));
} $timestamp = $authtokenInfo['timestamp']; $authtoken = $authtokenInfo['authtoken']; $heading = new JUI\Heading('Authtoken bearbeiten'); $jUI->add($heading); $input = new JUI\Input('name'); $input->setValue($name); $input->setLabel('Bezeichnung: '); $jUI->add($input); $jUI->add("Zeitpunkt: " . $timestamp); $jUI->add("Authtoken: " . $authtoken); $submit = new JUI\Button('Speichern', TRUE); $jUI->add($submit); $delete = new JUI\Button('Authtoken entfernen'); $delete->setClick(new JUI\Click(JUI\Click::openPlugin, $pluginManager, 'authtoken', $id . '/remove')); $jUI->add($delete); } else { if ($id == 'removeAll') { $heading = new JUI\Heading('Sind sie sich sicher, dass sie alle Authtokens löschen wollen?'); $jUI->add($heading); $jUI->add('Nach der Löschung kann sich keines ihrer Endgeräte mehr mit dem Server verbinden. Sie werden auch von diesem Gerät abgemeldet. Wollen sie fortfahren?'); $yes = new JUI\Button('Ja'); $yes->setClick(new JUI\Click(JUI\Click::openPlugin, $pluginManager, 'authtoken', 'removeAll/yes')); $jUI->add($yes); $no = new JUI\Button('Nein'); $no->setClick(new JUI\Click(JUI\Click::openPlugin, $pluginManager)); $jUI->add($no); } } } }
<?php if (!empty($_POST['notePassword']) && !empty($_POST['noteId'])) { $pluginManager->redirect($pluginManager, 'notes', $_POST['noteId'] . '/' . LoginManager::getSaltedPassword($loginManager->getUsername(), $_POST['notePassword'])); } $noteId = $pluginManager->getCommand(0); $jUI->add(new JUI\Heading("Anmeldung für Notiz")); $idInput = new JUI\Input("noteId"); $idInput->setValue($noteId); $idInput->setVisible(JUI\View::GONE); $jUI->add($idInput); $password = new JUI\Input("notePassword"); $password->setLabel("Kennwort"); $password->setPreset(JUI\Input::PASSWORD); $jUI->add($password); $jUI->nline(2); $submit = new JUI\Button("Speichern"); $submit->setClick(new JUI\Click(JUI\Click::submit)); $jUI->add($submit);
$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); ?>
<?php require_once $pluginManager->getController('tools'); $jUI->add(new JUI\Heading('Kontakte')); $create = new JUI\Button('Kontakt erstellen'); $create->setClick(new JUI\Click(JUI\Click::openPlugin, $pluginManager, 'create')); $jUI->add($create); $contacts = $pluginManager->databaseManager->getValues(null, array(array("name" => "lastname"), array("name" => "firstname"))); $list = new JUI\ListView(); if (!empty($contacts) && is_array($contacts)) { foreach ($contacts as $contact) { $name = $contact['lastname'] . ', ' . $contact['firstname']; $click = new JUI\Click(JUI\Click::openPlugin, $pluginManager, 'contact', $contact['id']); $list->addItem($name, $click); } } $jUI->add($list);
if ($folder == "./") { $folder = ""; } $folder = str_replace('//', '/', $folder); $folder = str_replace('..', '.', $folder); if (!empty($_FILES)) { if ($pluginManager->fileManager->uploadFiles($_FILES['files'], $folder)) { $pluginManager->redirect($pluginManager, 'home', $folder); } } if (!$loginManager->getShareManager()->isShared()) { $jUI->setShare('share', $folder); } $jUI->add(new JUI\Heading('Dateien')); if (!$loginManager->getShareManager()->isShared() || $loginManager->getShareManager()->getParameter()->allowCreate === TRUE) { $createFolder = new JUI\Button('Ordner erstellen'); $createFolder->setClick(new JUI\Click(JUI\Click::openPlugin, $pluginManager, 'createfolder', $folder)); $jUI->add($createFolder); } if (!$loginManager->getShareManager()->isShared() || $loginManager->getShareManager()->getParameter()->allowUpload === TRUE) { $fileupload = new JUI\File('files'); $fileupload->setMultiple(); $jUI->add($fileupload); $jUI->add(new JUI\Button('Hochladen', TRUE)); } $list = new JUI\ListView(); if (!empty($folder)) { //$list = array(".."); $upperFolder = dirname($folder); if ($upperFolder == ".") { $upperFolder = "";
} if (!empty($addressArray->zipcode)) { $addressString .= $addressArray->zipcode . ' '; } if (!empty($addressArray->city)) { $addressString .= $addressArray->city . PHP_EOL; } if (!empty($addressArray->state)) { $addressString .= $addressArray->state . PHP_EOL; } if (!empty($addressArray->country)) { $addressString .= $addressArray->country; } } $table->addRow(nameValueRow('Adresse: ', $addressString)); } if (!empty($contact['birthday'])) { $table->addRow(nameValueRow('Geburtstag: ', $contact['birthday'])); } $jUI->add($table); //$jUI->setSwipe(JUI\Manager::SWIPE_BOTTOM, new JUI\Click( JUI\Click::openPlugin, 'plg_serversettings', 'home', '' )); $edit = new JUI\Button('Bearbeiten'); $edit->setClick(new JUI\Click(JUI\Click::openPlugin, $pluginManager, 'edit', $command)); $jUI->add($edit); $download = new JUI\Button('Als vCard herunterladen'); $download->setClick(new JUI\Click(JUI\Click::openMedia, 'file', FileManager::FILESYSTEM_PLUGIN_DOWNLOAD . '://plg_contacts/' . $command)); $jUI->add($download); } } else { $pluginManager->redirect($pluginManager); }
} if (!empty($_POST['allowDeeper'])) { $plg_files_parameter['allowDeeper'] = TRUE; } else { $plg_files_parameter['allowDeeper'] = FALSE; } $url = $loginManager->getShareManager()->getUrl($pluginManager->getPluginName(), 'home', $folder); $jUI->add(new JUI\Heading('Freigabelink')); $warning = new JUI\Text('Dieser Link ist ab sofort gültig. Sollten sie ihn doch nicht gebrauchen, so empfehlen wir ihnen diesen zu löschen.'); $warning->setColor('#FF0000'); $jUI->add($warning); $input = new JUI\Input('url'); $input->setValue($url); $jUI->add($input); $jUI->nline(2); $ok = new JUI\Button('OK'); $ok->setClick(new JUI\Click(JUI\Click::openPlugin, $pluginManager, 'home', $folder)); $jUI->add($ok); } else { $jUI->add(new JUI\Heading('Freigabe einrichten')); $allowUpload = new JUI\Checkbox('allowUpload'); $allowUpload->setLabel('Upload erlauben'); $jUI->add($allowUpload); $jUI->nline(); $allowCreate = new JUI\Checkbox('allowCreate'); $allowCreate->setLabel('Ordner erstellen erlauben'); $jUI->add($allowCreate); $jUI->nline(); $allowDeeper = new JUI\Checkbox('allowDeeper'); $allowDeeper->setLabel('Darf in Unterordner schauen'); $jUI->add($allowDeeper);
<?php $pluginManager->databaseManager->selectTable(0); $values = $pluginManager->databaseManager->getValues(); $jUI->add(new JUI\Heading("Konten")); if (!empty($values) && is_array($values)) { $list = new JUI\ListView(); foreach ($values as $account) { $click = new JUI\Click(JUI\Click::openPlugin, $pluginManager, 'mail', $account['id']); $list->addItem($account['server'], $click); } $jUI->add($list); } else { $jUI->add(new JUI\Text("Keine Konten vorhanden.")); } $create_account = new JUI\Button("Konto hinzufügen"); $create_account->setClick(new JUI\Click(JUI\Click::openPlugin, $pluginManager, "create")); $jUI->add($create_account);
<?php $notesArray = $pluginManager->databaseManager->getValues(); $notes = null; $noteIds = null; $noteLong = null; $jUI->add(new JUI\Heading("Notizen")); $list = new JUI\ListView(); foreach ($notesArray as $note) { $name = $note['name']; if (empty($note['password'])) { $click = new JUI\Click(JUI\Click::openPlugin, $pluginManager, 'notes', $note['id']); $longClick = new JUI\Click(JUI\Click::openPlugin, $pluginManager, 'notesettings', $note['id']); } else { $click = $longClick = new JUI\Click(JUI\Click::openPlugin, $pluginManager, 'password', $note['id']); } $list->addItem($name, $click, $longClick); } $jUI->add($list); $button = new JUI\Button("Neue Notiz erstellen"); $button->setClick(new JUI\Click(JUI\Click::openPlugin, $pluginManager, 'addnote')); $jUI->add($button);
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); }