예제 #1
0
function showTeamspeakLogs($jUI)
{
    global $loginManager;
    global $pluginManager;
    $log = $pluginManager->getCommand(1);
    if (empty($log) || !is_string($log)) {
        $files = scandir("/home/teamspeak/logs/");
        $listView = new JUI\ListView();
        if (!empty($files) && is_array($files)) {
            $files = array_reverse($files);
            foreach ($files as $file) {
                if ($file != '.' && $file != '..') {
                    $click = new JUI\Click(JUI\Click::openPlugin, $pluginManager, 'logs/ts3', urlencode($file));
                    $listView->addItem($file, $click);
                }
            }
        }
        $jUI->add($listView);
    } else {
        $logfile = "/home/teamspeak/logs/" . urldecode($log);
        if (file_exists($logfile)) {
            $handle = fopen($logfile, "r");
            $contents = fread($handle, filesize($logfile));
            fclose($handle);
            $jUI->add(new JUI\Text($contents));
        } else {
            $jUI->add(new JUI\Text("Die Logdatei ist nicht vorhanden"));
        }
    }
    //echo $contents;
}
예제 #2
0
    $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);
}
예제 #3
0
<?php

$pluginManager->databaseManager->selectTable(1);
$jUI->add(new JUI\Widget($pluginManager->getPluginName(), "settings"));
$list = new JUI\ListView();
$list->addItem("Benutzer", new JUI\Click(JUI\Click::openPlugin, $pluginManager, 'user'));
$list->addItem("Channel", new JUI\Click(JUI\Click::openPlugin, $pluginManager, 'channel'));
$list->addItem("Broadcast senden", new JUI\Click(JUI\Click::openPlugin, $pluginManager, 'broadcast'));
$list->addItem("Einstellungen", new JUI\Click(JUI\Click::openPlugin, $pluginManager, 'settings'));
$jUI->add($list);
$jUI->hline();
$userId = $pluginManager->getSimpleStorage('connected_user_id', '', FALSE);
if (!empty($userId)) {
    require_once $pluginManager->getController('Ts3Viewer');
    require_once $pluginManager->getController('userButtons');
    $ts3viewer = new Ts3Viewer();
    if ($ts3viewer->connect()) {
        $ts3viewer->setNickname("Vision (Webinterface)");
        $userId = $pluginManager->getSimpleStorage('connected_user_id', '', FALSE);
        if (!empty($userId)) {
            $users = $ts3viewer->clientList();
            if (!empty($users) && is_array($users)) {
                foreach ($users as $user) {
                    if ($user['client_database_id'] == $userId) {
                        $jUI->add(new JUI\Heading($user['client_nickname']));
                        addUserButtons($user['clid']);
                        $jUI->newline();
                    }
                }
            }
        }
예제 #4
0
<?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);
예제 #5
0
$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);
    }
}
$authtokenContainer->add($list);
$jUI->add($authtokenContainer);
예제 #6
0
<?php

$jUI->add(new JUI\Text("Drücken sie auf eine Element aus der ersten Liste um dieses aus dem Menü zu entfernen. Drücken sie auf ein Element aus der zweiten Liste um dieses dem Menü hinzuzufügen."));
$jUI->add(new JUI\Heading("Menüleiste"));
$menuList = new JUI\ListView();
$mainPlugins = $pluginManager->getMainPluginsArray();
if (!empty($mainPlugins) && is_array($mainPlugins)) {
    foreach ($mainPlugins as $mainPlugin) {
        $id = $mainPlugin['id'];
        $name = $mainPlugin['name'];
        $menuList->addItem($name, new JUI\Click(JUI\Click::openPlugin, $pluginManager, 'remove', $id));
    }
}
$jUI->add($menuList);
$jUI->add(new JUI\Heading("Alle Plugins"));
$pluginList = new JUI\ListView();
$plugins = $pluginManager->getPlugins(FALSE);
if (!empty($plugins) && is_array($plugins)) {
    foreach ($plugins as $plugin) {
        $id = $plugin['id'];
        $name = $plugin['name'];
        if (!$pluginManager->isMainPlugin($id)) {
            $pluginList->addItem($name, new JUI\Click(JUI\Click::openPlugin, $pluginManager, 'add', $id));
        }
    }
}
$jUI->add($pluginList);
예제 #7
0
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 = "";
    }
    $list->addItem("..", new JUI\Click(JUI\Click::openPlugin, $pluginManager, 'home', $upperFolder));
}
$folders = null;
$files = null;
foreach ($pluginManager->fileManager->getFolder($folder) as $element) {
    if (FileManager::isVisible($element['name'])) {
        if ($element['type'] == "dir") {
            $name = $element['name'];
            $click = new JUI\Click(JUI\Click::openPlugin, $pluginManager, "home", $folder . $element['name'] . '/');
예제 #8
0
$account = $pluginManager->getCommand(0);
$command1 = $pluginManager->getCommand(1);
if (!empty($account) && is_numeric($account)) {
    require_once $pluginManager->getController('email');
    $accountData = $pluginManager->databaseManager->getValues(array("id" => array("value" => $account)), 1);
    if (empty($accountData) || empty($accountData['server']) || empty($accountData['port']) || empty($accountData['username']) || empty($accountData['password'])) {
        $pluginManager->redirect($pluginManager, 'home');
    }
    $reader = new Email_reader($accountData['server'], $accountData['username'], $accountData['password'], $accountData['port']);
    if (!$reader->isConnected()) {
        $pluginManager->redirect($pluginManager, 'failed', $account);
    }
    if (!empty($command1) && is_numeric($command1)) {
        $mail = $reader->getBody($command1);
        if (!empty($mail)) {
            $frame = new JUI\Frame();
            $frame->setHtml($mail);
            $frame->setWidth("100%");
            $frame->setHeight("100%");
            $jUI->add($frame);
        }
    } else {
        $list = new JUI\ListView();
        foreach ($reader->headers() as $header) {
            $click = new JUI\Click(JUI\Click::openPlugin, $pluginManager, 'mail', $account . '/' . $header->id);
            $list->addItem(mb_decode_mimeheader($header->subject), $click);
        }
        $jUI->add($list);
    }
}
예제 #9
0
<?php

$jUI->setFlyover();
$heading = new JUI\Heading("Plugins");
$jUI->add($heading);
$list = new JUI\ListView();
$plugins = $pluginManager->getPluginTags();
$pluginArray = null;
if (!empty($plugins)) {
    foreach ($plugins as $plugin) {
        $name = $plugin['name'];
        $id = $plugin['id'];
        if ($id == $pluginManager->getPluginName() || $id == 'plg_user') {
            continue;
        }
        if (!$loginManager->isAllowed('use_' . $id)) {
            continue;
        }
        if (empty($pluginArray[$name])) {
            $pluginArray[$name] = array("id" => $id, "name" => $name);
        } else {
            $pluginArray[$name . '_' . count($pluginArray)] = array("id" => $id, "name" => $name);
        }
    }
}
ksort($pluginArray, SORT_STRING);
/* TODO */
if (!empty($pluginArray)) {
    foreach ($pluginArray as $plugin) {
        $name = $plugin['name'];
        $id = $plugin['id'];
예제 #10
0
<?php

$jUI->add(new JUI\Heading("Chats"));
$list = new JUI\ListView();
$userList = $loginManager->GetUserList();
foreach ($userList as $user) {
    $id = $user['id'];
    $username = $user['username'];
    $list->addItem($username, new JUI\Click(JUI\Click::openPlugin, $pluginManager, 'user', $id));
}
$jUI->add($list);
예제 #11
0
<?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);
예제 #12
0
<?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);
예제 #13
0
<?php

$jUI->add(new JUI\Heading("Lizenzen"));
$list = new JUI\ListView();
$list->addItem("Webdav - Copyright (C) 2007-2015 fruux GmbH (https://fruux.com/) - three-clause BSD", new JUI\Click(JUI\Click::openPlugin, $pluginManager, 'webdav'));
$list->addItem("PHP-Websockets Server - Copyright (c) 2012, Adam Alexander - own license (modified three-clause BSD)", new JUI\Click(JUI\Click::openPlugin, $pluginManager, 'websockets'));
$list->addItem("Websocket client - (c) Paragi Aps 2013, Simon Riget - own license", new JUI\Click(JUI\Click::openPlugin, $pluginManager, 'websocketclient1'));
$list->addItem("TouchImageView (android) - (c) 2012, Michael Ortiz - own license", new JUI\Click(JUI\Click::openPlugin, $pluginManager, 'touchimageview'));
$jUI->add($list);