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($musicArray) && is_array($musicArray)) { foreach ($musicArray as $music) { $title = $music['name']; $click = $music['click']; $longclick = $array['longclick']; $list->addItem($title, $click, $longclick); } } $jUI->add($list); } else { $input = new JUI\Input('readmusic'); $input->setValue('TRUE'); $input->setVisible(JUI\View::GONE); $jUI->add($input); $button = new JUI\Button('Musik aus Dateien einlesen (Vorgang kann etwas dauern).', TRUE); $jUI->add($button); }
<?php if (!empty($_POST['about'])) { $pluginManager->setPluginStorage('about', $_POST['about']); } $jUI->add(new JUI\Heading('Über diesen Server')); $text = new JUI\Text($pluginManager->getPluginStorage('about')); $jUI->add($text); if ($loginManager->getGroup() == LoginManager::GROUP_SERVER_ADMIN) { $jUI->nline(); $jUI->hline(); $jUI->nline(); $jUI->add(new JUI\Heading('Bearbeiten', TRUE)); $input = new JUI\Input('about'); $input->setPreset(JUI\Input::MULTILINE); $input->setValue($pluginManager->getPluginStorage('about')); $jUI->add($input); $jUI->nline(2); $jUI->add(new JUI\Button('Speichern', TRUE)); }
$name = $_POST['name']; $loginManager->setAuthtokenName($id, $name); $pluginManager->redirect($pluginManager); } $authtokenInfo = $loginManager->getAuthtokenInfoById($id); if (!empty($authtokenInfo['name'])) { $name = $authtokenInfo['name']; } else { $name = "kein Name"; } $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');
$jUI->add($name); $jUI->nline(); $expense = new JUI\Input("expense"); $expense->setAccepted(JUI\Input::NUMBERS); $expense->setValue($valueString); $expense->setLabel("Preis:"); $jUI->add($expense); } else { $valueString = $entry['value'] / 100; $valueString = number_format($valueString, 2, '.', ','); $jUI->add(new JUI\Heading("Einnahme bearbeiten")); $name = new JUI\Input("name"); $name->setLabel("Name:"); $name->setValue($entry['name']); $jUI->add($name); $jUI->nline(); $earning = new JUI\Input("earning"); $earning->setAccepted(JUI\Input::NUMBERS); $earning->setValue($valueString); $earning->setLabel("Preis:"); $jUI->add($earning); } $jUI->nline(); $date = new JUI\Input('timestamp'); $date->setPreset(JUI\Input::DATE); $date->setLabel('Datum: '); $date->setValue($entry['timestamp']); $jUI->add($date); $jUI->nline(2); $jUI->add(new JUI\Button("Speichern", TRUE)); }
$pNotification = new Notification($nachricht, "Nachricht von " . $loginManager->getUsername(), time() + 86400); $pNotification->setIcon($pluginManager->getImage('icon.png')); $notificationManager = $pluginManager->getNotificationManager(); $notificationManager->addNotification($pNotification, $recipient, true); $pluginManager->redirect($pluginManager, 'user', $recipient); } $jUI->scrollBottom(true); $heading = new JUI\Heading("Chat mit " . $senderList[$recipient]['username']); $jUI->add($heading); $pluginManager->getFileManager(); $data = $pluginManager->getTemporary('data'); $pluginManager->unsetTemporary('data'); $pluginManager->unsetTemporary('files'); $notifyInput = new JUI\Input('nachricht'); $notifyInput->setLabel('Nachricht: '); $notifyInput->setValue($data); $jUI->add($notifyInput); $submitButton = new JUI\Button('Nachricht senden', TRUE); $jUI->add($submitButton); //$nachrichten = $pluginManager->databaseManager->getValues(Array("recipient"=>Array("value"=>$recipient, "operator"=>"=", "or"=>array("name"=>"sender","value"=>$recipient)))); $nachrichten = $pluginManager->databaseManager->getValues(array('((`recipient`=? AND `sender`=?) OR (`recipient`=? AND `sender`=?))', 'iiii', array($recipient, $loginManager->getId(), $loginManager->getId(), $recipient))); if (!empty($nachrichten)) { foreach ($nachrichten as $nachricht) { $sender = $nachricht['sender']; $type = $nachricht['type']; $senderView = new JUI\Text($senderList[$sender]['username']); $senderView->setAppearance(JUI\Text::BOLDITALIC); $senderView->setColor('#' . stringToColorCode($sender)); if (!empty($type) && $type == '1') { $file = $nachricht['text']; if ($pluginManager->fileManager->fileExists('thumb/' . $file, TRUE, FileManager::FILESYSTEM_PLUGIN_PUBLIC)) {
$keyText->setAppearance(JUI\Text::BOLD); $keyDescription = new JUI\Text($value['description']); $keyDescription->setAppearance(JUI\Text::ITALIC); $keyColumn = new JUI\Table\Column(); $keyColumn->add($keyText); $keyColumn->add($keyDescription); $row = new JUI\Table\Row(); $row->addColumn($keyColumn); if ($value['type'] == "STRING") { $view = new JUI\Input($key); $view->setValue($value['value']); } else { if ($value['type'] == "INTEGER") { $view = new JUI\Input($key); $view->setAccepted(JUI\Input::NUMBERS); $view->setValue($value['value']); } else { if ($value['type'] == "BOOLEAN") { $view = new JUI\Select($key); $view->addItem("TRUE"); $view->addItem("FALSE"); $view->setValue(strtoupper($value['value'])); } else { if ($value['type'] == "COLOR") { $view = new JUI\Color($key); $view->setValue($value['value']); } else { if ($value['type'] == "ARRAY") { $view = new JUI\Text(json_encode($value['value'])); } else { if (is_string($value['value'])) {
<?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);
$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); } } $jUI->add(new JUI\Heading($value['name'])); $textarea = new JUI\Input("noteContent"); $textarea->setPreset(JUI\Input::MULTILINE); $textarea->setWidth('100%'); $textarea->setHeight(200); $textarea->setValue($value['text']); $jUI->add($textarea); $warning = new JUI\Text("Wenn das Kennwortfeld leer gelassen wird, so wird das bisherige Kennwort benutzt."); $warning->setColor("#FF0000"); $jUI->add($warning); $passwordInput = new JUI\Input("password"); $passwordInput->setPreset(JUI\Input::PASSWORD); $jUI->add($passwordInput); $jUI->nline(2); $settings = new JUI\Button("Einstellungen"); $tmpId = $id; if (!empty($password)) { $tmpId = $id . '/' . $password; } $settings->setClick(new JUI\Click(JUI\Click::openPlugin, $pluginManager, 'notesettings', $tmpId)); $jUI->add($settings);
$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); $input = new JUI\Input('shareFiles'); $input->setValue('true'); $input->setVisible(JUI\View::GONE); $jUI->add($input); $jUI->nline(2); $jUI->add(new JUI\Button('Freigeben', TRUE)); } //echo $loginManager->getShareManager()->getUrl($pluginManager->getPluginName(), 'home', $folder);
$name = $plugin['name']; if (!empty($plugin['permissions']) && is_array($plugin['permissions'])) { $permissions = $plugin['permissions']; $jUI->add(new JUI\Heading($name, true)); foreach ($permissions as $permission) { $permissionId = $permission['id']; $permissionName = $permission['name']; $permissionDefault = $permission['default']; $jUI->nline(); $checkbox = new JUI\Checkbox($permissionId); $checkbox->setLabel($permissionName); if (!empty($userPrivilegs[$permissionId]) && $userPrivilegs[$permissionId] == 1) { $checkbox->setChecked(true); } $jUI->add($checkbox); } } } if ($pluginManager->getCommand(1) == "success") { //echo '{"type":"warning","value":"Änderungen gespeichert"},'; $jUI->setWarning("Änderungen gespeichert"); } $jUI->nline(2); $hidden = new JUI\Input("userid"); $hidden->setVisible(JUI\View::GONE); $hidden->setValue($command); $jUI->add($hidden); $jUI->add(new JUI\Button("Speichern", true)); } } }
} if (!empty($addressArray->zipcode)) { $zipcode->setValue($addressArray->zipcode); } if (!empty($addressArray->state)) { $state->setValue($addressArray->state); } if (!empty($addressArray->country)) { $country->setValue($addressArray->country); } } $jUI->add($address); $jUI->nline(); $jUI->add($city); $jUI->add($zipcode); $jUI->nline(); $jUI->add($state); $jUI->nline(); $jUI->add($country); $jUI->nline(); $jUI->nline(); $birthday = new JUI\Input('birthday'); $birthday->setLabel('Geburtstag: '); $birthday->setPreset(JUI\Input::DATE); $birthday->setValue($contact); $jUI->add($birthday); $jUI->nline(); $jUI->nline(); $jUI->add(new JUI\Button('Speichern', TRUE)); } }