<div class="col-sm-8"> <div class="btn-toolbar"> <?php echo $templates->switchToggle('Export Playlist', 'doQuickCommand', '[\'musicplayer storing\']', '', array_key_exists('song_storing', $botSettings) && $botSettings['song_storing'] == 1); ?> <?php echo $templates->switchToggle('Exporting Playlist as ' . (array_key_exists('song_titles', $botSettings) && $botSettings['song_titles'] == '1' ? '.html' : '.txt'), 'doQuickCommand', '[\'musicplayer titles\']', '', array_key_exists('song_titles', $botSettings) && $botSettings['song_titles'] == '1', false, false, true); ?> <?php echo $templates->switchToggle('Whisper Mode', 'doQuickCommand', '[\'whispermode\']', '', array_key_exists('whisper_mode', $botSettings) && $botSettings['whisper_mode'] == 'true'); ?> </div> <div class="spacer"></div> <div class="btn-toolbar"> <?php echo $templates->switchToggle('Enable Event/Error Logging', $templates->_wrapInJsToggledDoQuickCommand('log', array_key_exists('logenable', $botSettings) && $botSettings['logenable'] == '1' ? 'true' : 'false', 'enable', 'disable'), '[]', '', array_key_exists('logenable', $botSettings) && $botSettings['logenable'] == '1'); ?> <?php echo $templates->switchToggle('Enable Chat Logging', $templates->_wrapInJsToggledDoQuickCommand('logchat', array_key_exists('logchat', $botSettings) && $botSettings['logchat'] == '1' ? 'true' : 'false', 'enable', 'disable'), '[]', '', array_key_exists('logchat', $botSettings) && $botSettings['logchat'] == '1'); ?> </div> <div class="spacer"></div> <div class="row"> <div class="col-sm-4"> <?php echo $templates->botCommandForm('log days', 'Set log rotate days', '[days]', array_key_exists('logrotatedays', $botSettings) ? $botSettings['logrotatedays'] : '7', 'Set'); ?> </div> </div> </div> <div class="col-sm-4">
$functions = new \PBPanel\Util\FunctionLibrary($dataStore, $connection); $templates = new \PBPanel\Util\ComponentTemplates(); $botModules = $functions->getDbTableArray('modules'); $modulesTableRows = ''; $NOModules = 0; $NOModulesActive = 0; ksort($botModules); foreach ($botModules as $modulePath => $status) { if (strpos($modulePath, './lang') > -1) { continue; } $NOModules++; if ($functions->strToBool($status)) { $NOModulesActive++; } $toggle = $templates->switchToggle('', $templates->_wrapInJsToggledDoQuickCommand('module', $functions->strToBool($status) ? 'true' : 'false', 'disable ' . $modulePath, 'enable ' . $modulePath), null, null, $functions->strToBool($status), false, true, false, strpos($modulePath, './core') > -1); $modulesTableRows .= '<tr><td>' . $modulePath . '</td><td>' . $toggle . '</td></tr>'; } ?> <div class="app-part"> <div class="panel panel-default"> <div class="panel-heading"> <h3 class="panel-title"> Module Manager <?php echo $templates->toggleFavoriteButton(); ?> <span class="text-info pull-right"><span class="fa fa-info-circle"></span> <?php echo $NOModules; ?> Known Module's, <?php
$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++; } $toggleButton = $templates->switchToggle('', $templates->_wrapInJsToggledDoQuickCommand('module', $active ? 'true' : 'false', 'disable ' . $moduleFullPath, 'enable ' . $moduleFullPath), null, null, $active, false, true, false, strpos($moduleFullPath, 'util') > -1 || strpos($moduleFullPath, 'lang') > -1); $modulesTableRows .= '<tr><td>' . $templates->switchToggleText($moduleName, false, true) . '</td><td>' . $toggleButton . '</td></tr>'; } ?> <div class="app-part"> <div class="panel panel-default"> <div class="panel-heading"> <h3 class="panel-title"> Module Manager <?php echo $templates->toggleFavoriteButton(); ?> <span class="text-info pull-right"><span class="fa fa-info-circle"></span> <?php echo count($moduleSettingsIni); ?> Known Module's, <?php
</div> <div class="row"> <div class="col-sm-4"> <?php echo $templates->botCommandForm('chatmod warningcountresettime', 'Warning Count Reset Time', '[seconds]', array_key_exists('warningcountresettime', $botSettings) ? $botSettings['warningcountresettime'] : ''); ?> </div> </div> </div> <hr/> <h4 class="collapsible-master">Links</h4> <div class="collapsible-content"> <div class="btn-toolbar"> <?php echo $templates->switchToggle('Allow Links', $templates->_wrapInJsToggledDoQuickCommand('chatmod linksallowed', array_key_exists('linksallowed', $botSettings) && $botSettings['linksallowed'] == '0' ? 'true' : 'false', 'true', 'false'), null, null, array_key_exists('linksallowed', $botSettings) && $botSettings['linksallowed'] == 1); ?> <?php echo $templates->switchToggle('Allow Youtube Links', $templates->_wrapInJsToggledDoQuickCommand('chatmod youtubeallowed', array_key_exists('youtubeallowed', $botSettings) && $botSettings['youtubeallowed'] == '0' ? 'true' : 'false', 'true', 'false'), null, null, array_key_exists('youtubeallowed', $botSettings) && $botSettings['youtubeallowed'] == 1); ?> </div> <div class="spacer"></div> <div class="btn-toolbar"> <?php echo $templates->switchToggle('Allow Links From Regulars', $templates->_wrapInJsToggledDoQuickCommand('chatmod regsallowed', array_key_exists('regsallowed', $botSettings) && $botSettings['regsallowed'] == '0' ? 'true' : 'false', 'true', 'false'), null, null, array_key_exists('linksallowed', $botSettings) && $botSettings['linksallowed'] == 1); ?> <?php echo $templates->switchToggle('Allow Links From Subscribers', $templates->_wrapInJsToggledDoQuickCommand('chatmod subsallowed', array_key_exists('subsallowed', $botSettings) && $botSettings['subsallowed'] == '0' ? 'true' : 'false', 'true', 'false'), null, null, array_key_exists('youtubeallowed', $botSettings) && $botSettings['youtubeallowed'] == 1); ?> </div> <div class="spacer"></div>
echo $templates->botCommandButton('uptime', 'Announce Current Up-time'); ?> <?php echo $templates->botCommandButton('botuptime', 'Announce Current Bot-up-time'); ?> </div> </div> <div class="btn-toolbar"> <?php echo $noticeCount > 0 ? $templates->botCommandButton('notice get ' . rand(0, $noticeCount - 1), 'Random Notice', 'default btn-sm') : ''; ?> <?php echo $templates->botCommandButton('clear', 'Clear Chat', 'default btn-sm'); ?> <?php echo $templates->switchToggle('Mute Bot', $templates->_wrapInJsToggledDoQuickCommand('response', array_key_exists('response_@all', $botSettings) && $botSettings['response_@all'] == 0 ? 'true' : 'false', 'enable', 'disable'), '[]', '', array_key_exists('response_@all', $botSettings) && $botSettings['response_@all'] == 0, true); ?> <?php echo $templates->botCommandButton('d !exit', 'Shutdown ' . $dataStore->getVar('connector', 'botName'), 'danger btn-sm'); ?> </div> <hr/> <h4 class="collapsible-master">Edit Stream Title & Game</h4> <div class="collapsible-content"> <div class="row"> <div class="col-sm-8"> <?php echo $templates->botCommandForm('title', 'Title', 'title', array_key_exists('title', $botStreamInfo) ? $botStreamInfo['title'] : ''); ?> </div>