Ejemplo n.º 1
0
 $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)) {
                 $file = 'thumb/' . $file;
             }
             $hash = $pluginManager->fileManager->getImageHash($file, FileManager::FILESYSTEM_PLUGIN_PUBLIC);
             $contentView = new JUI\Image($hash);
             $contentView->setClick(new JUI\Click(JUI\Click::openMedia, 'image', FileManager::FILESYSTEM_PLUGIN_PUBLIC . '://plg_messenger/' . $nachricht['text']));
         } else {
             $contentView = new JUI\Text($nachricht['text']);
             if ($nachricht['sender'] != $loginManager->getId()) {
                 $senderView->setAlign(JUI\Text::RIGHT);
                 $contentView->setAlign(JUI\Text::RIGHT);
             }
         }
Ejemplo n.º 2
0
/* 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");
}
$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);
Ejemplo n.º 3
0
<?php

require_once $pluginManager->getController('tools');
if (!empty($_POST['color'])) {
    $color = stringToColorCode($_POST['color']);
    $text = new JUI\Text("#" . $color);
    $text->setColor("#" . $color);
    $jUI->add($text);
}
$jUI->add(new JUI\Input("color"));
$button = new JUI\Button("Senden", TRUE);
$jUI->add($button);
Ejemplo n.º 4
0
        $row = new JUI\Table\Row();
        $row->addColumn($name);
        $row->addColumn($timestamp);
        $row->addColumn($text);
        $row->setClick(new JUI\Click(JUI\Click::openPlugin, $pluginManager, 'entry', $value['id']));
        $table->addRow($row);
        $overview += $value['value'] / 100;
    }
}
// ALL
$valuePrice = number_format($overview, 2, ',', '.');
$name = new JUI\Text("Insgesamt");
$text = new JUI\Text($valuePrice . ' €');
$text->setAlignment(JUI\Text::RIGHT);
if ($overview < 0) {
    $text->setColor("#FF0000");
} else {
    $text->setColor("#00FF00");
}
$table2 = new JUI\Table();
$table2->setWidth("100%");
$row = new JUI\Table\Row();
$row->addColumn($name);
$row->addColumn($text);
$table2->addRow($row);
$jUI->add($table2);
// END ALL
$jUI->hline();
$jUI->add($table);
$jUI->nline();
$table3 = new JUI\Table();
Ejemplo n.º 5
0
        $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);
$jUI->add(new JUI\Button("Speichern", true));
$back = new JUI\Button("Zurück");
$back->setClick(new JUI\Click(JUI\Click::openPlugin, $pluginManager));
Ejemplo n.º 6
0
        $plg_files_parameter['allowUpload'] = FALSE;
    }
    if (!empty($_POST['allowCreate'])) {
        $plg_files_parameter['allowCreate'] = TRUE;
    } else {
        $plg_files_parameter['allowCreate'] = FALSE;
    }
    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');
Ejemplo n.º 7
0
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);
}