}
    preg_match('/(.*)\\s\\(.+\\s([a-z0-9_]+)\\)$/i', $functions->cleanYTVideoTitle($item), $matches);
    $requestQueueDataRows .= '<tr><td>' . ($requestQueueLength + 1) . '.</td><td>' . $matches[1] . '</td><td>' . $matches[2] . '</td></tr>';
    ++$requestQueueLength;
}
?>
<div class="app-part">
  <div class="panel panel-default">
    <div class="panel-heading">
      <h3 class="panel-title">
        Youtube Player
        <?php 
echo $templates->toggleFavoriteButton();
?>
        <?php 
echo $templates->moduleActiveIndicator($functions->getModuleStatus('youtubePlayer.js'));
?>
      </h3>
    </div>
    <div class="panel-body">
      <h4 class="collapsible-master">Other Settings</h4>

      <div class="collapsible-content">
        <div class="btn-toolbar">
          <?php 
echo $templates->switchToggle('Toggle Song Requests', 'doQuickCommand', '[\'togglerequests\']', '', array_key_exists('requestsEnabled', $youtubePlayerSettings) && $youtubePlayerSettings['requestsEnabled'] == 'true');
?>
          <?php 
echo $templates->switchToggle('Toggle Chat Notifications', 'doQuickCommand', '[\'musicplayer togglenotify\']', '', array_key_exists('updatesInChat', $youtubePlayerSettings) && $youtubePlayerSettings['updatesInChat'] == 'true');
?>
          <?php 
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();
?>
        <?php 
echo $templates->moduleActiveIndicator($functions->getModuleStatus('subscribeHandler.js'));
?>
      </h3>
    </div>
    <div class="panel-body">
      <div class="btn-toolbar">
        <?php 
echo $templates->switchToggle('Toggle Subscriber Notices', 'doQuickCommand', '[\'subsilentmode\']', null, array_key_exists('sub_silentmode', $botSettings) && $botSettings['sub_silentmode'] == 1);
?>
        <div class="btn-group">
          <?php 
echo $templates->botCommandButton('subscribecount', 'Current Subscriber Count');
?>
          <?php 
echo $templates->botCommandButton('subscribemode', 'Subscribe Mode');
?>
Esempio n. 3
0
{
    $raffleFile = str_replace(['raffle_', '.txt'], '', $raffleFile);
    $fileDate = DateTime::createFromFormat('d-m-Y_G:i:s_e', $raffleFile);
    return $fileDate ? $fileDate->format('d-m-Y H:i:s') : '';
}
?>
<div class="app-part">
  <div class="panel panel-default">
    <div class="panel-heading">
      <h3 class="panel-title">
        Raffle System
        <?php 
echo $templates->toggleFavoriteButton();
?>
        <?php 
echo $templates->moduleActiveIndicator($functions->getModuleStatus('raffleSystem.js'));
?>
      </h3>
    </div>
    <div class="panel-body">
      <div class="btn-toolbar">
        <?php 
echo $templates->botCommandButton('raffle', 'Anounce Current Raffle', 'default');
?>
        <?php 
echo $templates->botCommandButton('raffle close', 'Close Current Raffle', 'default');
?>
        <?php 
echo $templates->botCommandButton('raffle redraw', 'Redraw Current Raffle Winner', 'default');
?>
      </div>
Esempio n. 4
0
                return $group;
        }
    }
    return $group;
}
?>
<div class="app-part">
  <div class="panel panel-default">
    <div class="panel-heading">
      <h3 class="panel-title">
        Bot Commands
        <?php 
echo $templates->toggleFavoriteButton();
?>
        <?php 
echo $templates->moduleActiveIndicator($functions->getModuleStatus('addCommand.js'));
?>
      </h3>
    </div>
    <div class="panel-body">
      <?php 
echo $templates->botCommandForm('', 'Run command', '[command] [params]');
?>
      <hr/>
      <h4 class="collapsible-master">Command Creation</h4>

      <div class="collapsible-content">
        <div class="row">
          <div class="col-sm-6">
            <?php 
echo $templates->botCommandForm('addcom', 'Add command', '[command] [message]');
Esempio n. 5
0
$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'));
?>
    </div>
    <div class="panel-body">
      <div class="btn-toolbar">
        <?php 
echo $templates->botCommandButton('bankheist start', 'Start Bank Heist');
?>
        <?php 
echo $templates->switchToggle('Toggle Bankheist', 'doQuickCommand', '[\'bankheist toggle\']', '', array_key_exists('bankheistToggle', $botSettings) ? filter_var($botSettings['bankheistToggle'], FILTER_VALIDATE_BOOLEAN) : false);
?>
      </div>
      <hr/>
      <h4 class="collapsible-master">Session Settings</h4>

      <div class="collapsible-content">
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\FunctionLibrary($dataStore, $connection);
$templates = new \PBPanel\Util\ComponentTemplates();
$botSettings = $functions->getDbTableArray('settings');
?>
<div class="app-part">
  <div class="panel panel-default">
    <div class="panel-heading">
      <h3 class="panel-title">
        MODULE NAME
        <?php 
echo $templates->toggleFavoriteButton();
?>
        <?php 
echo $templates->moduleActiveIndicator($functions->getModuleStatus('MODULE SCRIPT NAME'));
?>
      </h3>
    </div>
    <div class="panel-body">
      PAGE CONTENT
    </div>
  </div>
</div>
Esempio n. 7
0
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">
    <div class="panel-heading">
      <h3 class="panel-title">
        Group System
        <?php 
echo $templates->toggleFavoriteButton();
?>
        <?php 
echo $templates->moduleActiveIndicator($functions->getModuleStatus('permissions.js'));
?>
      </h3>
    </div>
    <div class="panel-body">
      <h4 class="collapsible-master">Group settings per viewer</h4>

      <div class="collapsible-content">
        <div class="row">
          <div class="col-sm-4">
            <?php 
echo $templates->botCommandForm('group set', 'Set viewers group', '[username] [groupname]');
?>
          </div>
          <div class="col-sm-4">
            <?php 
Esempio n. 8
0
                return $group;
        }
    }
    return $group;
}
?>
<div class="app-part">
  <div class="panel panel-default">
    <div class="panel-heading">
      <h3 class="panel-title">
        Bot Commands
        <?php 
echo $templates->toggleFavoriteButton();
?>
        <?php 
echo $templates->moduleActiveIndicator($functions->getModuleStatus('customCommands.js'));
?>
      </h3>
    </div>
    <div class="panel-body">
      <?php 
echo $templates->botCommandFormV2('', 'Run Command', ['placeholder' => '[command] [params]', 'noReload' => true, 'autoComplete' => 'all']);
?>
      <hr/>
      <h4 class="collapsible-master">Command Creation</h4>

      <div class="collapsible-content">
        <div class="row">
          <div class="col-sm-6">
            <?php 
echo $templates->botCommandForm('addcom', 'Add command', '[command] [message]');
$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>
    <div class="panel-body">
      <h4>Moderate Now</h4>

      <div class="btn-toolbar">
        <?php 
echo $templates->botCommandButton('clear', 'Clear The Chat');
?>
      </div>
      <div class="spacer"></div>
      <div class="row">
        <div class="col-sm-8">
          <?php 
Esempio n. 10
0
$commandTimerCommands = $functions->getDbTableArray('commandTimer');
$commandTimerCommandsDataRows = '';
foreach ($commandTimerCommands as $command => $active) {
    $commandTimerCommandsDataRows .= '<tr>' . '<td>' . $templates->botCommandButton($command, '!' . $command, 'default') . '</td>' . '<td style="width:54px;">' . $templates->botCommandButton('delcommandtimer ' . $command, '<span class="fa fa-trash"></span>', 'danger') . '</td>' . '</tr>';
}
?>
<div class="app-part">
  <div class="panel panel-default">
    <div class="panel-heading">
      <h3 class="panel-title">
        Command Timer
        <?php 
echo $templates->toggleFavoriteButton();
?>
        <?php 
echo $templates->moduleActiveIndicator($functions->getModuleStatus('commandTimer.js'));
?>
      </h3>
    </div>
    <div class="panel-body">
      <div class="btn-toolbar">
        <?php 
echo $templates->switchToggle('Toggle Command Timer', 'doQuickCommand', '[\'commandtimer toggle\']', null, array_key_exists('active', $commandTimerSettings) ? filter_var($commandTimerSettings['active'], FILTER_VALIDATE_BOOLEAN) : true);
?>
        <?php 
echo $templates->switchToggle('Toggle Randomizing', 'doQuickCommand', '[\'commandtimer togglerandom\']', null, array_key_exists('randomize', $commandTimerSettings) ? filter_var($commandTimerSettings['randomize'], FILTER_VALIDATE_BOOLEAN) : true);
?>
      </div>
      <hr/>
      <h4>Add Commands</h4>
$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');
?>
<div class="app-part">
  <div class="panel panel-default">
    <div class="panel-heading">
      <h3 class="panel-title">
        Donations
        <?php 
echo $templates->toggleFavoriteButton();
?>
        <?php 
echo $templates->moduleActiveIndicator($functions->getModuleStatus('./handlers/donationHandler.js'));
?>
      </h3>
    </div>
    <div class="panel-body">
      <h4>Donation Event Settings</h4>

      <div class="btn-toolbar">
        <?php 
echo $templates->switchToggle('Enable Donation Alerts', 'doQuickCommand', '[\'donationalert toggle\']', '', array_key_exists('donation_toggle', $botSettings) && $botSettings['donation_toggle'] == '1');
?>
      </div>
      <div class="spacer"></div>
      <div class="row">
        <div class="col-sm-4">
          <?php 
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 
echo $templates->toggleFavoriteButton();
?>
        <?php 
echo $templates->moduleActiveIndicator($functions->getModuleStatus('followHandler.js'));
?>
      </h3>
    </div>
    <div class="panel-body">
      <div class="row">
        <div class="col-sm-4">
          <?php 
echo $templates->botCommandForm('followed', 'Check follower');
?>
        </div>
        <div class="col-sm-4">
          <?php 
echo $templates->botCommandForm('lastseen', 'Last seen');
?>
        </div>