$pluginManager->databaseManager->selectTable(0); $array['server'] = array("type" => "varchar", "value" => $server); $array['port'] = array("type" => "integer", "value" => $port); $array['username'] = array("type" => "varchar", "value" => $username); $array['password'] = array("type" => "varchar", "value" => $password); $pluginManager->databaseManager->insertValue($array); $pluginManager->redirect($pluginManager, 'mail', $pluginManager->databaseManager->getInsertId()); } $jUI->add(new JUI\Heading("Konto hinzufügen")); $description = new JUI\Input("description"); $description->setLabel("Beschreibung:"); $jUI->add($description); $jUI->nline(); $server = new JUI\Input("server"); $server->setLabel("Server:"); $jUI->add($server); $port = new JUI\Input("port"); $port->setLabel("Port:"); $jUI->add($port); $jUI->nline(); $username = new JUI\Input("username"); $username->setLabel("Benutzername:"); $jUI->add($username); $jUI->nline(); $password = new JUI\Input("password"); $password->setLabel("Kennwort:"); $password->setPreset(JUI\Input::PASSWORD); $jUI->add($password); $jUI->nline(2); $submit = new JUI\Button("Absenden", true); $jUI->add($submit);
<?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)); }
$jUI->add($email); $jUI->nline(); $jUI->nline(); $address = new JUI\Input('address'); $address->setLabel('Straße/Nr.: '); $jUI->add($address); $jUI->nline(); $city = new JUI\Input('city'); $city->setLabel('Stadt: '); $jUI->add($city); $zipcode = new JUI\Input('zipcode'); $zipcode->setLabel('PLZ: '); $jUI->add($zipcode); $jUI->nline(); $state = new JUI\Input('state'); $state->setLabel('Bundesland: '); $jUI->add($state); $jUI->nline(); $country = new JUI\Input('country'); $country->setLabel('Land: '); $jUI->add($country); $jUI->nline(); $jUI->nline(); $birthday = new JUI\Input('birthday'); $birthday->setLabel('Geburtstag: '); $birthday->setPreset(JUI\Input::DATE); $jUI->add($birthday); $jUI->nline(); $jUI->nline(); $jUI->add(new JUI\Button('Erstellen', TRUE)); }
$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)); }
if (!empty($_POST['noteName']) and !empty($_POST['noteContent'])) { $name = $_POST['noteName']; $content = $_POST['noteContent']; if (!empty($_POST['notePassword'])) { $password = LoginManager::getSaltedPassword($loginManager->getUsername(), $_POST['notePassword']); } else { $password = ''; } $pluginManager->databaseManager->insertValue(array("name" => array("value" => $name), "text" => array("value" => $content), "password" => array("value" => $password))); $pluginManager->redirect($pluginManager); } $jUI->add(new JUI\Heading("Notiz erstellen")); $name = new JUI\Input("noteName"); $name->setLabel("Name: "); $jUI->add($name); $jUI->nline(); $passwordInput = new JUI\Input("notePassword"); $passwordInput->setPreset(JUI\Input::PASSWORD); $jUI->add($passwordInput); $jUI->nline(2); $textarea = new JUI\Input("noteContent"); $textarea->setPreset(JUI\Input::MULTILINE); $textarea->setWidth('100%'); $textarea->setHeight(200); $jUI->add($textarea); $jUI->nline(2); $jUI->add(new JUI\Button("Speichern", true)); $back = new JUI\Button("Zurück"); $back->setClick(new JUI\Click(JUI\Click::openPlugin, $pluginManager)); $jUI->add($back);