Example #1
0
    }
} else {
    sort($viewers);
}
foreach ($viewers as $username) {
    $viewersDataRows .= '<tr>
                        <td>
                          <table>
                            <tr><td>' . $username . '</td></tr>
                            <tr><td class="text-muted">' . (array_key_exists($username, $viewerGroups) ? $groups[$viewerGroups[$username]] : $groups[7]) . '</td></tr>
                            <tr><td>' . (array_key_exists($username, $viewerRanks) ? '<span class="text-muted">' . $viewerRanks[$username] . '</span>' : '') . '</td></tr>
                          </table>
                        </td>
                        <td>
                          <table>
                            <tr><td class="text-muted">Last Seen:&nbsp;</td><td>' . (array_key_exists($username, $lastSeen) ? $functions->secondsToDate(round($lastSeen[$username] / 1000)) : 'Unknown') . '</td></tr>
                            <tr><td class="text-muted">Recorded Time:&nbsp;</td><td>' . $functions->secondsToTime($viewerTime[$username]) . '</td></tr>
                            <tr><td class="text-muted">' . $psName . ':&nbsp;</td><td>' . (array_key_exists($username, $viewerPoints) ? $viewerPoints[$username] : 0) . '</td></tr>
                            <tr>
                              <td colspan="2">' . (array_key_exists($username, $followers) && $functions->strToBool($followers[$username]) ? '<span class="text-success">Follows you</span>' : '<span class="text-danger">Does not follow you</span>') . (array_key_exists($username, $incRaids) ? ', <span class="text-success">Raided you ' . $incRaids[$username] . ' times!</span>' : '') . '</td>
                            </tr>
                          </table>
                        </td>
                      </tr>';
}
?>
<div class="app-part">
  <div class="panel panel-default">
    <div class="panel-heading">
      <h3 class="panel-title">
        Viewer Info
Example #2
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();
$quotes = $functions->getDbTableArray('quotes');
$quotesDataRows = '';
foreach ($quotes as $id => $quote) {
    $quote = json_decode($quote);
    $quotesDataRows .= '<tr><td>' . $templates->botCommandButton('quote ' . $id, $id) . '</td><td>' . $quote[0] . '</td><td>' . $quote[1] . '</td><td>' . $functions->secondsToDate(floor($quote[2] / 1000)) . '</td></tr>';
}
?>
<!--suppress HtmlUnknownTarget -->
<div class="app-part">
  <div class="panel panel-default">
    <div class="panel-heading">
      <h3 class="panel-title">
        Quote System
        <?php 
echo $templates->toggleFavoriteButton();
?>
        <?php 
echo $templates->moduleActiveIndicator($functions->getModuleStatus('quoteSystem.js'));
?>
      </h3>