예제 #1
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>
예제 #2
0
    }
    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 
예제 #3
0
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>
예제 #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('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]');
예제 #5
0
$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">
        Host Events
        <?php 
echo $templates->toggleFavoriteButton();
?>
        <?php 
echo $templates->moduleActiveIndicator($functions->getModuleStatus('hostHandler.js'));
?>
      </h3>
    </div>
    <div class="panel-body">
      <div class="btn-group">
        <?php 
echo $templates->botCommandButton('hostcount', 'Current Host Count');
?>
        <?php 
echo $templates->botCommandButton('hostlist', 'Hoster List');
?>
      </div>
      <hr/>
      <h4>Hosts Settings</h4>
예제 #6
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>
예제 #7
0
$connection = new \PBPanel\Util\BotConnectionHandler($dataStore);
$functions = new \PBPanel\Util\FunctionLibrary($dataStore, $connection);
$templates = new \PBPanel\Util\ComponentTemplates();
$botSettings = $functions->getDbTableArray('settings');
$chatModSettings = $functions->getDbTableArray('chatModerator');
?>
<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</h4>

      <div class="row">
        <div class="col-sm-6">
          <?php 
echo $templates->combinedBotCommandForm('', ['permit' => 'Permit Link', 'purge' => 'Purge', 'timeout' => 'Timeout', 'ban' => 'Ban', 'unban' => 'Unban'], 'Moderate', '[username]');
?>
        </div>
      </div>
      <hr/>
      <h4 class="collapsible-master">Auto Moderator Settings</h4>