<commit_before><h1 class="page-header">STANDINGS</h1>

<?php //var_dump($data);?>
<div class="filter">
    <form action="" method="GET">
        <input type="hidden" name="page" value="<?= $page ?>">
        <div class="filter-field">
            Tournaments:
            <br />
            <select name="tournament_id" width="">
<!--                <option value="ALL">All joined</option>-->
                <?php foreach ($data['tournaments'] as $row): ?>
                    <option value="<?= $row['id'] ?>"><?= $row['name'] ?></option>
                <?php endforeach; ?>
            </select>
        </div>
        <br />
        <br />
        <br />
        <button type="submit">Filter</button>
    </form>
</div>
<br />

<h4>Viewing: <?= $data['tournament_name']; ?></h4>

<h5 style="width: 500px">
    <span class="table-field-left">Pos</span>
    <span class="table-field-center">Username</span>
    <span class="table-field-right">Points</span>
</h5>
<br />

<?php $position = 0; ?>
<div>
    <ul>
        <?php foreach ($data['standings'] as $row): ?>
            <?php $position++; ?>
            <li>
                <span class="table-field-left"><?= $position; ?></span>
                <span class="table-field-center"><?= $row['email']; ?></span>
                <span class="table-field-right"><?= $row['points']; ?></span>
            </li>
            <br />
            <br />
        <?php endforeach; ?>
    </ul>
</div>

<?php if ( !$data['standings'] ): ?>
    No data to display.
<?php endif; ?><commit_msg>Style Standing view.<commit_after><h1 class="page-header">STANDINGS</h1>

<div class="panel panel-default">
    <div class="panel-heading"><span class="glyphicon glyphicon-filter"></span>Filter bar</div>
    <div class="panel-body">
        <form action="" method="GET">
            <input type="hidden" name="page" value="<?= $page ?>">
            <div class="row">
                <div class="form-group col-sm-12">
                    <label>Tournaments</label>
                    <select name="tournament_id" class="form-control" width="">
                        <?php foreach ($data['tournaments'] as $row): ?>
                            <option value="<?= $row['id'] ?>"><?= $row['name'] ?></option>
                        <?php endforeach; ?>
                    </select>
                </div>
            </div>
            <div class="row">
                <div class="col-xs-12">
                    <button type="submit" class="btn btn-primary center-block">Filter</button>
                </div>
            </div>
        </form>
    </div>
</div>

<h4>Viewing: <?= $data['tournament_name']; ?></h4>
<?php $position = 0; ?>
<table class="table table-striped">
    <thead>
        <tr>
            <th>Position</th>
            <th>Username</th>
            <th>Points</th>
        </tr>
    </thead>
    <tbody>
    <?php foreach ($data['standings'] as $row): ?>
        <?php $position++; ?>
        <tr>
            <td><?= $position; ?></td>
            <td><?= $row['email']; ?></td>
            <td><?= $row['points']; ?></td>
        </tr>
    <?php endforeach; ?>
    </tbody>
</table>

<?php if ( !$data['standings'] ): ?>
    No data to display.
<?php endif; ?>
{'fraction_non_alphanumeric': 0.218091697645601, 'fraction_numerical': 0.005885997521685254, 'mean_word_length': 1.8856121537086685, 'pattern_counts': {'":': 0, '<': 135, '<?xml version=': 0, '>': 135, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3802642', 'n_tokens_mistral': 1015, 'n_tokens_neox': 994, 'n_words': 210}