* Created with PhpStorm * User: Robin | Juraji * Date: 12 okt 2015 * Time: 12:42 */ require_once '../../../AppLoader.class.php'; \PBPanel\AppLoader::load(); $session = new \PBPanel\Util\PanelSession(); if (!$session->checkSessionToken(filter_input(INPUT_POST, 'token'))) { die('Invalid session token. Are you trying to hack me?!'); } $dataStore = new \PBPanel\Util\DataStore(); $connection = new \PBPanel\Util\BotConnectionHandler($dataStore); $functions = new \PBPanel\Util\Functions($dataStore, $connection); $templates = new \PBPanel\Util\ComponentTemplates(); $botSettings = $functions->getIniArray('settings'); $groups = $functions->getIniArray('groups'); $viewerGroups = $functions->getIniArray('group'); $groupTableRows = ''; $viewerGroupTableRows = ''; foreach ($groups as $gid => $gName) { $groupTableRows .= '<tr><td>' . $gid . '</td><td>' . $gName . '</td></tr>'; } foreach ($viewerGroups as $username => $gid) { if ($gid != 'null') { $viewerGroupTableRows .= '<tr><td>' . ucfirst($username) . '</td><td>' . $groups[$gid] . '</td></tr>'; } } ?> <div class="app-part"> <div class="panel panel-default">
?> <!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8"> <title></title> <link href="app/css/music-player.css" rel="stylesheet" type="text/css"/> <link rel="icon" href="/favicon.ico" type="image/x-icon"/> <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon"/> <script> var botAddress = '<?php echo $eventServerAdress; ?> ', commandPermissions = <?php echo json_encode($functions->getIniArray('permcom')); ?> , userGroups = <?php echo json_encode($functions->getIniArray('group')); ?> , sfxCommands = <?php echo json_encode($dataStore->getTableAsArray('sfxcommands')); ?> ; </script> <script src="//code.jquery.com/jquery-1.11.3.min.js" type="text/javascript"></script> <script src="//code.jquery.com/ui/1.11.3/jquery-ui.min.js" type="text/javascript"></script> <script src="app/js/rsocket.min.js"></script> <script src="app/js/sfx-host.min.js"></script>
if (!array_key_exists('username', $input) || !array_key_exists('password', $input) || !$functions->isValidUser($input['username'], $input['password'])) { $functions->sendBackError('No login'); exit; } if (array_key_exists('action', $input) && $input['action'] != '') { $action = $input['action']; switch ($action) { case 'config': $functions->getJSConfig(); break; case 'getConfig': $functions->getConfig(); break; case 'command': if (array_key_exists('command', $input) && $input['username']) { echo json_encode($connection->send('!' . $input['command'], array_key_exists(strtolower($input['username']), $functions->getIniArray('visited')) ? $input['username'] : $dataStore->getVar('connector', 'channelOwner'))); } else { $functions->sendBackError('Command is empty'); } break; case 'getIni': if (array_key_exists('uri', $input)) { $functions->getIniArray($input['uri'], false); } else { $functions->sendBackError('Missing ini uri'); } break; case 'getOtherFile': if (array_key_exists('uri', $input)) { $functions->getOtherFile($input['uri'], false); } else {
* Created with PhpStorm * User: Robin | Juraji * Date: 12 okt 2015 * Time: 12:43 */ require_once '../../../AppLoader.class.php'; \PBPanel\AppLoader::load(); $session = new \PBPanel\Util\PanelSession(); if (!$session->checkSessionToken(filter_input(INPUT_POST, 'token'))) { die('Invalid session token. Are you trying to hack me?!'); } $dataStore = new \PBPanel\Util\DataStore(); $connection = new \PBPanel\Util\BotConnectionHandler($dataStore); $functions = new \PBPanel\Util\Functions($dataStore, $connection); $templates = new \PBPanel\Util\ComponentTemplates(); $botSettings = $functions->getIniArray('settings'); $phrases = $functions->getIniArray('phrases'); $phraseTableRows = ''; foreach ($phrases as $emote => $reply) { $phraseTableRows .= '<tr><td>' . $emote . '</td><td>' . $reply . '</td></tr>'; } ?> <div class="app-part"> <div class="panel panel-default"> <div class="panel-heading"> <h3 class="panel-title"> Phrase Triggers <?php echo $templates->toggleFavoriteButton(); ?> <?php
* User: Robin | Juraji * Date: 12 okt 2015 * Time: 12:45 */ require_once '../../../AppLoader.class.php'; \PBPanel\AppLoader::load(); $session = new \PBPanel\Util\PanelSession(); if (!$session->checkSessionToken(filter_input(INPUT_POST, 'token'))) { die('Invalid session token. Are you trying to hack me?!'); } $dataStore = new \PBPanel\Util\DataStore(); $connection = new \PBPanel\Util\BotConnectionHandler($dataStore); $functions = new \PBPanel\Util\Functions($dataStore, $connection); $templates = new \PBPanel\Util\ComponentTemplates(); $filter = filter_input_array(INPUT_POST); $botSettings = $functions->getIniArray('settings'); $time = $functions->getIniArray('time'); $timeTableRows = ''; if (!is_array($filter)) { $filter = []; } if (array_key_exists('time', $filter)) { if ($filter['time'] == 'ASC') { asort($time, SORT_NATURAL); } if ($filter['time'] == 'DESC') { arsort($time, SORT_NATURAL); } } if (array_key_exists('username', $filter)) { if ($filter['username'] == 'DESC') {
* Created with PhpStorm * User: Robin | Juraji * Date: 12 okt 2015 * Time: 12:42 */ require_once '../../../AppLoader.class.php'; \PBPanel\AppLoader::load(); $session = new \PBPanel\Util\PanelSession(); if (!$session->checkSessionToken(filter_input(INPUT_POST, 'token'))) { die('Invalid session token. Are you trying to hack me?!'); } $dataStore = new \PBPanel\Util\DataStore(); $connection = new \PBPanel\Util\BotConnectionHandler($dataStore); $functions = new \PBPanel\Util\Functions($dataStore, $connection); $templates = new \PBPanel\Util\ComponentTemplates(); $botSettings = $functions->getIniArray('settings'); $groups = $functions->getIniArray('groups'); $customCommandsIni = $functions->getIniArray('command'); $commandAliasIni = $functions->getIniArray('aliases'); $commandPriceIni = $functions->getIniArray('pricecom'); $commandPermIni = $functions->getIniArray('permcom'); $commandCooldown = $functions->getIniArray('coolcom'); $defaultCommands = []; $pointNames = [array_key_exists('pointNameMultiple', $botSettings) ? $botSettings['pointNameMultiple'] : 'points', array_key_exists('pointNameSingle', $botSettings) ? $botSettings['pointNameSingle'] : 'point']; $customCommandsTableRows = ''; $defaultCommandsTableRows = ''; foreach ($customCommandsIni as $command => $message) { $commandAliases = []; foreach ($commandAliasIni as $alias => $originalCommand) { if ($originalCommand == $command) { $commandAliases[] = '!' . $alias;
* Created with PhpStorm * User: Robin | Juraji * Date: 12 okt 2015 * Time: 12:40 */ require_once '../../../AppLoader.class.php'; \PBPanel\AppLoader::load(); $session = new \PBPanel\Util\PanelSession(); if (!$session->checkSessionToken(filter_input(INPUT_POST, 'token'))) { die('Invalid session token. Are you trying to hack me?!'); } $dataStore = new \PBPanel\Util\DataStore(); $connection = new \PBPanel\Util\BotConnectionHandler($dataStore); $functions = new \PBPanel\Util\Functions($dataStore, $connection); $templates = new \PBPanel\Util\ComponentTemplates(); $botSettings = $functions->getIniArray('settings'); $bankHeistTimers = $functions->getIniArray('bankheist_timers', true); $bankHeistStrings = $functions->getIniArray('bankheist_strings', true); $bankHeistRatios = $functions->getIniArray('bankheist_ratios', true); $bankHeistChances = $functions->getIniArray('bankheist_chances', true); ?> <div class="app-part"> <div class="panel panel-default"> <div class="panel-heading"> <h3 class="panel-title"> Bank Heist <?php echo $templates->toggleFavoriteButton(); ?> <?php echo $templates->moduleActiveIndicator($functions->getModuleStatus('bankHeistSystem.js'));
* Created with PhpStorm * User: Robin | Juraji * Date: 12 okt 2015 * Time: 12:39 */ require_once '../../../AppLoader.class.php'; \PBPanel\AppLoader::load(); $session = new \PBPanel\Util\PanelSession(); if (!$session->checkSessionToken(filter_input(INPUT_POST, 'token'))) { die('Invalid session token. Are you trying to hack me?!'); } $dataStore = new \PBPanel\Util\DataStore(); $connection = new \PBPanel\Util\BotConnectionHandler($dataStore); $functions = new \PBPanel\Util\Functions($dataStore, $connection); $templates = new \PBPanel\Util\ComponentTemplates(); $moduleSettingsIni = $functions->getIniArray('modules'); $modulesTableRows = ''; $moduleNameReplacements = ['./', '_enabled']; $NOModulesActive = 0; uksort($moduleSettingsIni, function ($a, $b) use($moduleNameReplacements) { return strcasecmp(str_replace($moduleNameReplacements, '', $a), str_replace($moduleNameReplacements, '', $b)); }); foreach ($moduleSettingsIni as $fullPath => $active) { if (strpos($fullPath, 'lang-') > -1) { continue; } $moduleName = ucfirst(str_replace($moduleNameReplacements, '', $fullPath)); $moduleFullPath = str_replace('_enabled', '', $fullPath); $active = $active == 1 || strpos($moduleFullPath, 'util') > -1; if ($active) { $NOModulesActive++;
* Created with PhpStorm * User: Robin | Juraji * Date: 12 okt 2015 * Time: 12:41 */ require_once '../../../AppLoader.class.php'; \PBPanel\AppLoader::load(); $session = new \PBPanel\Util\PanelSession(); if (!$session->checkSessionToken(filter_input(INPUT_POST, 'token'))) { die('Invalid session token. Are you trying to hack me?!'); } $dataStore = new \PBPanel\Util\DataStore(); $connection = new \PBPanel\Util\BotConnectionHandler($dataStore); $functions = new \PBPanel\Util\Functions($dataStore, $connection); $templates = new \PBPanel\Util\ComponentTemplates(); $slotMachineSettings = $functions->getIniArray('slotMachine'); $priceComSettings = $functions->getIniArray('pricecom'); ?> <div class="app-part"> <div class="panel panel-default"> <div class="panel-heading"> <h3 class="panel-title"> Slot Machine Command <?php echo $templates->toggleFavoriteButton(); ?> <?php echo $templates->moduleActiveIndicator($functions->getModuleStatus('slotMachineCommand.js')); ?> </h3> </div>
* Created with PhpStorm * User: Robin | Juraji * Date: 12 okt 2015 * Time: 12:41 */ require_once '../../../AppLoader.class.php'; \PBPanel\AppLoader::load(); $session = new \PBPanel\Util\PanelSession(); if (!$session->checkSessionToken(filter_input(INPUT_POST, 'token'))) { die('Invalid session token. Are you trying to hack me?!'); } $dataStore = new \PBPanel\Util\DataStore(); $connection = new \PBPanel\Util\BotConnectionHandler($dataStore); $functions = new \PBPanel\Util\Functions($dataStore, $connection); $templates = new \PBPanel\Util\ComponentTemplates(); $botSettings = $functions->getIniArray('settings'); $rollSettings = $functions->getIniArray('roll'); ?> <div class="app-part"> <div class="panel panel-default"> <div class="panel-heading"> <h3 class="panel-title"> Roll Command <?php echo $templates->toggleFavoriteButton(); ?> <?php echo $templates->moduleActiveIndicator($functions->getModuleStatus('rollCommand.js')); ?> </h3> </div>
<?php /** * Created by PhpStorm. * User: Robin | Juraji * Date: 10-12-2015 * Time: 19:49 */ require_once '../../AppLoader.class.php'; \PBPanel\AppLoader::load(); $dataStore = new \PBPanel\Util\DataStore(); $connection = new PBPanel\Util\BotConnectionHandler($dataStore); $functions = new \PBPanel\Util\Functions($dataStore, $connection); $templates = new \PBPanel\Util\ComponentTemplates(); $userPoints = $functions->getIniArray('points'); $customCommands = $functions->getIniArray('command'); $userPointsDataRows = ''; $customCommandsDataRows = ''; foreach ($userPoints as $user => $points) { $userPointsDataRows .= '<tr><td>' . $user . '</td><td>' . $points . '</td></tr>'; } foreach ($customCommands as $command => $output) { $customCommandsDataRows .= '<tr><td>!' . $command . '</td><td>' . $output . '</td></tr>'; } ?> <!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8"> <title></title> <link href="app/css/<?php
* Created with PhpStorm * User: Robin | Juraji * Date: 12 okt 2015 * Time: 12:40 */ require_once '../../../AppLoader.class.php'; \PBPanel\AppLoader::load(); $session = new \PBPanel\Util\PanelSession(); if (!$session->checkSessionToken(filter_input(INPUT_POST, 'token'))) { die('Invalid session token. Are you trying to hack me?!'); } $dataStore = new \PBPanel\Util\DataStore(); $connection = new \PBPanel\Util\BotConnectionHandler($dataStore); $functions = new \PBPanel\Util\Functions($dataStore, $connection); $templates = new \PBPanel\Util\ComponentTemplates(); $timezoneSettings = $functions->getIniArray('timezone'); $marathonSettings = $functions->getIniRaw('marathon', true); $lastAnnouncement = null; $marathonName = null; $marathonLink = null; $scheduleTableRows = ''; $marathonSettings = explode(PHP_EOL, $marathonSettings); if ($marathonSettings) { foreach ($marathonSettings as $line) { if ($line == '') { continue; } $key = explode('=', $line)[0]; $value = explode('=', $line)[1]; switch ($key) { case 'lastAnnounce':
* Created with PhpStorm * User: Robin | Juraji * Date: 12 okt 2015 * Time: 12:41 */ require_once '../../../AppLoader.class.php'; \PBPanel\AppLoader::load(); $session = new \PBPanel\Util\PanelSession(); if (!$session->checkSessionToken(filter_input(INPUT_POST, 'token'))) { die('Invalid session token. Are you trying to hack me?!'); } $dataStore = new \PBPanel\Util\DataStore(); $connection = new \PBPanel\Util\BotConnectionHandler($dataStore); $functions = new \PBPanel\Util\Functions($dataStore, $connection); $templates = new \PBPanel\Util\ComponentTemplates(); $botSettings = $functions->getIniArray('settings'); $botStreamInfo = $functions->getIniArray('stream_info', true); $noticeCount = $functions->getIniValueByKey('notice', 'num_messages'); ?> <div class="app-part"> <div class="panel panel-default"> <div class="panel-heading"> <h3 class="panel-title">Dashboard <span class="text-muted">Update stream info</span></h3> </div> <div class="panel-body"> <h4>Quick Commands</h4> <div class="form-group form-group-sm"> <div class="btn-group btn-group-sm"> <?php echo $templates->botCommandButton('title', 'Announce Current Title');
* User: Robin | Juraji * Date: 12 okt 2015 * Time: 12:44 */ require_once '../../../AppLoader.class.php'; \PBPanel\AppLoader::load(); $session = new \PBPanel\Util\PanelSession(); if (!$session->checkSessionToken(filter_input(INPUT_POST, 'token'))) { die('Invalid session token. Are you trying to hack me?!'); } $dataStore = new \PBPanel\Util\DataStore(); $connection = new \PBPanel\Util\BotConnectionHandler($dataStore); $functions = new \PBPanel\Util\Functions($dataStore, $connection); $templates = new \PBPanel\Util\ComponentTemplates(); $filter = filter_input_array(INPUT_POST); $botSettings = $functions->getIniArray('settings'); $points = $functions->getIniArray('points'); $pointsTableRows = ''; $totalPoints = 0; $pointsName = ' ' . (array_key_exists('pointNameMultiple', $botSettings) ? $botSettings['pointNameMultiple'] : 'points'); if (!is_array($filter)) { $filter = []; } if (array_key_exists('points', $filter)) { if ($filter['points'] == 'MAX') { $points = array_filter($points, function ($value) { return intval($value) > 1500; }); } if ($filter['points'] == 'ASC') { asort($points, SORT_NATURAL);
* Created with PhpStorm * User: Robin | Juraji * Date: 12 okt 2015 * Time: 12:44 */ require_once '../../../AppLoader.class.php'; \PBPanel\AppLoader::load(); $session = new \PBPanel\Util\PanelSession(); if (!$session->checkSessionToken(filter_input(INPUT_POST, 'token'))) { die('Invalid session token. Are you trying to hack me?!'); } $dataStore = new \PBPanel\Util\DataStore(); $connection = new \PBPanel\Util\BotConnectionHandler($dataStore); $functions = new \PBPanel\Util\Functions($dataStore, $connection); $templates = new \PBPanel\Util\ComponentTemplates(); $botSettings = $functions->getIniArray('settings'); $pastRaiders = $functions->getIniArray('raiders'); $pastRaidersTableRows = ''; $doRaidCommandResponse = $functions->getIniValueByKey('command', 'doraid'); $firstTime = false; $addCommandJsActive = $functions->getModuleStatus('addCommand.js'); $doRaidCommandForm = $templates->botCommandForm('doraid', 'Raid target', '[username]'); if ($addCommandJsActive == 1 && (!$doRaidCommandResponse || $doRaidCommandResponse == '')) { $connection->send('!addcom doraid Let\'s raid (1)! Go to http://twitch.tv/(1) and say "' . $dataStore->getVar('connector', 'channelOwner') . ' Raid!", throw them a follow and show the love! <3'); $firstTime = true; } elseif ($addCommandJsActive == '0') { $doRaidCommandForm = $templates->addTooltip($templates->botCommandForm('doraid', 'Raid target', '[username]', null, 'Send', true), 'Enable the addCommand.js module to use this form.' . $templates->botCommandButton('!module enable ./commands/addCommand.js', 'Enable addCommand.js Now', 'primary btn-block')); } foreach ($pastRaiders as $username => $timesRaided) { $pastRaidersTableRows .= '<tr><td>' . str_replace('_count', '', $username) . '</td><td>' . $timesRaided . ' raids</td></tr>'; }
* Created with PhpStorm * User: Robin | Juraji * Date: 12 okt 2015 * Time: 12:42 */ require_once '../../../AppLoader.class.php'; \PBPanel\AppLoader::load(); $session = new \PBPanel\Util\PanelSession(); if (!$session->checkSessionToken(filter_input(INPUT_POST, 'token'))) { die('Invalid session token. Are you trying to hack me?!'); } $dataStore = new \PBPanel\Util\DataStore(); $connection = new \PBPanel\Util\BotConnectionHandler($dataStore); $functions = new \PBPanel\Util\Functions($dataStore, $connection); $templates = new \PBPanel\Util\ComponentTemplates(); $greetingSettings = $functions->getIniArray('greeting'); $userGreetingRows = ''; foreach ($greetingSettings as $username => $greeting) { if (!in_array($username, ['autogreet', '_default'])) { $userGreetingRows .= '<tr><td>' . ucfirst($username) . '</td><td>' . $greeting . '</td></tr>'; } } ?> <div class="app-part"> <div class="panel panel-default"> <div class="panel-heading"> <h3 class="panel-title"> Greeting System <?php echo $templates->toggleFavoriteButton(); ?>
* Created with PhpStorm * User: Robin | Juraji * Date: 12 okt 2015 * Time: 12:44 */ require_once '../../../AppLoader.class.php'; \PBPanel\AppLoader::load(); $session = new \PBPanel\Util\PanelSession(); if (!$session->checkSessionToken(filter_input(INPUT_POST, 'token'))) { die('Invalid session token. Are you trying to hack me?!'); } $dataStore = new \PBPanel\Util\DataStore(); $connection = new \PBPanel\Util\BotConnectionHandler($dataStore); $functions = new \PBPanel\Util\Functions($dataStore, $connection); $templates = new \PBPanel\Util\ComponentTemplates(); $botSettings = $functions->getIniArray('settings'); $quotes = $functions->getIniArray('quotes'); $quotesTableRows = ''; unset($quotes['num_quotes']); foreach ($quotes as $quoteId => $quoteMessage) { $quotesTableRows .= '<tr><td>' . str_replace('quote_', '', $quoteId) . '</td><td>' . $quoteMessage . '</td></tr>'; } ?> <div class="app-part"> <div class="panel panel-default"> <div class="panel-heading"> <h3 class="panel-title"> Quote System <?php echo $templates->toggleFavoriteButton(); ?>
* Created with PhpStorm * User: Robin | Juraji * Date: 12 okt 2015 * Time: 12:43 */ require_once '../../../AppLoader.class.php'; \PBPanel\AppLoader::load(); $session = new \PBPanel\Util\PanelSession(); if (!$session->checkSessionToken(filter_input(INPUT_POST, 'token'))) { die('Invalid session token. Are you trying to hack me?!'); } $dataStore = new \PBPanel\Util\DataStore(); $connection = new \PBPanel\Util\BotConnectionHandler($dataStore); $functions = new \PBPanel\Util\Functions($dataStore, $connection); $templates = new \PBPanel\Util\ComponentTemplates(); $botSettings = $functions->getIniArray('settings'); $noticeSettings = $functions->getIniArray('notice'); $notices = $functions->getIniArray('notices'); $noticesTableRows = ''; foreach ($notices as $nid => $message) { $noticesTableRows .= '<tr><td>' . str_replace('message_', '', $nid) . '</td><td>' . $message . '</td></tr>'; } ?> <div class="app-part"> <div class="panel panel-default"> <div class="panel-heading"> <h3 class="panel-title"> Notice System <?php echo $templates->toggleFavoriteButton(); ?>
* Created with PhpStorm * User: Robin | Juraji * Date: 12 okt 2015 * Time: 12:40 */ require_once '../../../AppLoader.class.php'; \PBPanel\AppLoader::load(); $session = new \PBPanel\Util\PanelSession(); if (!$session->checkSessionToken(filter_input(INPUT_POST, 'token'))) { die('Invalid session token. Are you trying to hack me?!'); } $dataStore = new \PBPanel\Util\DataStore(); $connection = new \PBPanel\Util\BotConnectionHandler($dataStore); $functions = new \PBPanel\Util\Functions($dataStore, $connection); $templates = new \PBPanel\Util\ComponentTemplates(); $botSettings = $functions->getIniArray('settings'); $currentTheme = $dataStore->getVar('misc', 'theme', 'style_dark'); $themeFiles = new \PBPanel\Util\SortedDirectoryIterator(\PBPanel\AppLoader::getBaseDir() . '/app/css', false); $themesOptions = ''; /* @var \DirectoryIterator $themeFile */ foreach ($themeFiles as $themeFile) { if ($themeFile->getExtension() == 'css' && strpos($themeFile->getBasename(), 'style_') === 0) { $themesOptions .= '<option value="' . $themeFile->getBasename('.css') . '">' . ucfirst(str_replace('style_', '', $themeFile->getBasename('.css'))) . '</option>'; } } ?> <script> $('#toggle-information-button').prop('checked', pBotStorage.get(pBotStorage.keys.informationActive, true)); $('#toggle-tooltips-button').prop('checked', !pBotStorage.get(pBotStorage.keys.tooltipsActive, false)); $('#toggle-chat-default-button').prop('checked', pBotStorage.get(pBotStorage.keys.chatDefaultState, false)); </script>
* Created with PhpStorm * User: Robin | Juraji * Date: 12 okt 2015 * Time: 12:41 */ require_once '../../../AppLoader.class.php'; \PBPanel\AppLoader::load(); $session = new \PBPanel\Util\PanelSession(); if (!$session->checkSessionToken(filter_input(INPUT_POST, 'token'))) { die('Invalid session token. Are you trying to hack me?!'); } $dataStore = new \PBPanel\Util\DataStore(); $connection = new \PBPanel\Util\BotConnectionHandler($dataStore); $functions = new \PBPanel\Util\Functions($dataStore, $connection); $templates = new \PBPanel\Util\ComponentTemplates(); $botSettings = $functions->getIniArray('settings'); $urlWhiteList = $functions->getIniArray('whitelist'); ?> <div class="app-part"> <div class="panel panel-default"> <div class="panel-heading"> <h3 class="panel-title"> Chat Moderator <?php echo $templates->toggleFavoriteButton(); ?> <?php echo $templates->moduleActiveIndicator($functions->getModuleStatus('chatModerator.js')); ?> </h3> </div>
* Created with PhpStorm * User: Robin | Juraji * Date: 12 okt 2015 * Time: 12:45 */ require_once '../../../AppLoader.class.php'; \PBPanel\AppLoader::load(); $session = new \PBPanel\Util\PanelSession(); if (!$session->checkSessionToken(filter_input(INPUT_POST, 'token'))) { die('Invalid session token. Are you trying to hack me?!'); } $dataStore = new \PBPanel\Util\DataStore(); $connection = new \PBPanel\Util\BotConnectionHandler($dataStore); $functions = new \PBPanel\Util\Functions($dataStore, $connection); $templates = new \PBPanel\Util\ComponentTemplates(); $botSettings = $functions->getIniArray('settings'); $subscribers = $functions->getIniArray('subscribed'); $subscriberTableRows = ''; foreach ($subscribers as $username => $subscribed) { if ($subscribed == 1) { $subscriberTableRows .= '<tr><td>' . ucfirst($username) . '</td></tr>'; } } ?> <div class="app-part"> <div class="panel panel-default"> <div class="panel-heading"> <h3 class="panel-title"> Subscriber Events <?php echo $templates->toggleFavoriteButton();
* Created with PhpStorm * User: Robin | Juraji * Date: 12 okt 2015 * Time: 12:42 */ require_once '../../../AppLoader.class.php'; \PBPanel\AppLoader::load(); $session = new \PBPanel\Util\PanelSession(); if (!$session->checkSessionToken(filter_input(INPUT_POST, 'token'))) { die('Invalid session token. Are you trying to hack me?!'); } $dataStore = new \PBPanel\Util\DataStore(); $connection = new \PBPanel\Util\BotConnectionHandler($dataStore); $functions = new \PBPanel\Util\Functions($dataStore, $connection); $templates = new \PBPanel\Util\ComponentTemplates(); $botSettings = $functions->getIniArray('settings'); $recordedFollows = $functions->getIniArray('followed'); $userLastSeen = $functions->getIniArray('lastseen'); $followersTableRows = ''; foreach ($recordedFollows as $username => $follows) { if ($follows == '1') { $followersTableRows .= '<tr><td>' . ucfirst($username) . '</td><td>' . (array_key_exists($username, $userLastSeen) ? $functions->botTimeToStandardFormat($userLastSeen[$username]) : 'No data yet!') . '</td></tr>'; } } ?> <div class="app-part"> <div class="panel panel-default"> <div class="panel-heading"> <h3 class="panel-title"> Follow Events <?php