2024-10-03 16:33:31 +00:00
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="card w-auto bg-light border-light card-body" style="flex-direction: row;"><?= $widget['title'] ?></div>
|
|
|
|
|
|
|
|
<!-- Results filter -->
|
|
|
|
<div class="card w-auto bg-light border-light card-body text-right" style="text-align: right;">
|
2024-10-04 11:18:28 +00:00
|
|
|
<form method="POST" id="filter_form" action="?platform=<?= htmlspecialchars($platform_id) ?>&page=<?= htmlspecialchars($page) ?>">
|
2024-10-03 16:33:31 +00:00
|
|
|
<label for="from_time">from</label>
|
2024-10-04 11:18:28 +00:00
|
|
|
<input type="date" id="from_time" name="from_time"<?php if (isset($_REQUEST['from_time'])) echo " value=\"" . htmlspecialchars($from_time) . "\"" ?> />
|
2024-10-03 16:33:31 +00:00
|
|
|
<label for="until_time">until</label>
|
2024-10-04 11:18:28 +00:00
|
|
|
<input type="date" id="until_time" name="until_time"<?php if (isset($_REQUEST['until_time'])) echo " value=\"" . htmlspecialchars($until_time) . "\"" ?> />
|
|
|
|
<input type="text" name="id" placeholder="conference ID"<?php if (isset($_REQUEST['id'])) echo " value=\"" . htmlspecialchars($_REQUEST['id']) . "\"" ?> />
|
|
|
|
<input type="text" name="name" placeholder="conference name"<?php if (isset($_REQUEST['name'])) echo " value=\"" . htmlspecialchars($_REQUEST['name']) . "\"" ?> />
|
2024-10-03 16:33:31 +00:00
|
|
|
<input type="button" onclick="clearFilter()" value="clear" />
|
|
|
|
<input type="submit" value="search" />
|
|
|
|
</form>
|
|
|
|
<script>
|
|
|
|
function clearFilter() {
|
|
|
|
document.getElementById("filter_form").reset();
|
|
|
|
const filterFields = document.querySelectorAll("#filter_form input");
|
|
|
|
filterFields.forEach(input => {
|
|
|
|
if (input.type === 'text' ||input.type === 'date') {
|
|
|
|
input.value = '';
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</div>
|
|
|
|
<!-- /Results filter -->
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
2024-10-04 11:18:28 +00:00
|
|
|
<!-- widget "<?= htmlspecialchars($widget['name']) ?>" -->
|
|
|
|
<div class="collapse show" id="collapse<?= htmlspecialchars($widget['name']) ?>">
|
2024-10-03 16:33:31 +00:00
|
|
|
<?php if ($time_range_specified) { ?>
|
2024-10-04 11:18:28 +00:00
|
|
|
<p class="m-3">time period: <strong><?= htmlspecialchars($from_time) ?> - <?= htmlspecialchars($until_time) ?></strong></p>
|
2024-10-03 16:33:31 +00:00
|
|
|
<?php } ?>
|
|
|
|
<div class="mb-5">
|
|
|
|
<?php if ($widget['full'] === true) { ?>
|
|
|
|
<table class="table table-striped table-hover table-bordered">
|
|
|
|
<thead class="thead-dark">
|
|
|
|
<tr>
|
|
|
|
<?php foreach ($widget['table_headers'] as $header) { ?>
|
2024-10-04 11:18:28 +00:00
|
|
|
<th scope="col"><?= htmlspecialchars($header) ?></th>
|
2024-10-03 16:33:31 +00:00
|
|
|
<?php } ?>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<?php foreach ($widget['table_records'] as $row) { ?>
|
|
|
|
<tr>
|
2024-10-03 16:48:29 +00:00
|
|
|
<?php $stats_id = false;
|
|
|
|
$participant_ip = false;
|
|
|
|
if (isset($row['event']) && $row['event'] === 'stats_id') $stats_id = true;
|
|
|
|
if (isset($row['event']) && $row['event'] === 'pair selected') $participant_ip = true;
|
|
|
|
|
|
|
|
foreach ($row as $key => $column) {
|
2024-10-03 16:33:31 +00:00
|
|
|
if ($key === 'conference ID' && isset($conferenceId) && $conferenceId === $column) { ?>
|
2024-10-04 11:18:28 +00:00
|
|
|
<td><strong><?= htmlspecialchars($column ?? '') ?></strong></td>
|
2024-10-03 16:33:31 +00:00
|
|
|
<?php } elseif ($key === 'conference ID') { ?>
|
2024-10-04 11:18:28 +00:00
|
|
|
<td><a href="<?= htmlspecialchars($app_root) ?>?platform=<?= htmlspecialchars($platform_id) ?>&page=conferences&id=<?= htmlspecialchars($column ?? '') ?>"><?= htmlspecialchars($column ?? '') ?></a></td>
|
2024-10-03 16:33:31 +00:00
|
|
|
<?php } elseif ($key === 'conference name' && isset($conferenceName) && $conferenceName === $column) { ?>
|
2024-10-04 11:18:28 +00:00
|
|
|
<td><strong><?= htmlspecialchars($column ?? '') ?></strong></td>
|
2024-10-03 16:33:31 +00:00
|
|
|
<?php } elseif ($key === 'conference name') { ?>
|
2024-10-04 11:18:28 +00:00
|
|
|
<td><a href="<?= htmlspecialchars($app_root) ?>?platform=<?= htmlspecialchars($platform_id) ?>&page=conferences&name=<?= htmlspecialchars($column ?? '') ?>"><?= htmlspecialchars($column ?? '') ?></a></td>
|
2024-10-03 16:48:29 +00:00
|
|
|
<?php } elseif ($key === 'participant ID') { ?>
|
2024-10-04 11:18:28 +00:00
|
|
|
<td><a href="<?= htmlspecialchars($app_root) ?>?platform=<?= htmlspecialchars($platform_id) ?>&page=participants&id=<?= htmlspecialchars($column ?? '') ?>"><?= htmlspecialchars($column ?? '') ?></a></td>
|
2024-10-03 16:48:29 +00:00
|
|
|
<?php } elseif ($stats_id && $key === 'parameter') { ?>
|
2024-10-04 11:18:28 +00:00
|
|
|
<td><a href="<?= htmlspecialchars($app_root) ?>?platform=<?= htmlspecialchars($platform_id) ?>&page=participants&name=<?= htmlspecialchars($column ?? '') ?>"><?= htmlspecialchars($column ?? '') ?></a></td>
|
2024-10-03 16:48:29 +00:00
|
|
|
<?php } elseif ($participant_ip && $key === 'parameter') { ?>
|
2024-10-04 11:18:28 +00:00
|
|
|
<td><a href="<?= htmlspecialchars($app_root) ?>?platform=<?= htmlspecialchars($platform_id) ?>&page=participants&ip=<?= htmlspecialchars($column ?? '') ?>"><?= htmlspecialchars($column ?? '') ?></a></td>
|
2024-10-03 16:33:31 +00:00
|
|
|
<?php } else { ?>
|
2024-10-04 11:18:28 +00:00
|
|
|
<td><?= htmlspecialchars($column ?? '') ?></td>
|
2024-10-03 16:33:31 +00:00
|
|
|
<?php }
|
2024-10-03 16:48:29 +00:00
|
|
|
} ?>
|
2024-10-03 16:33:31 +00:00
|
|
|
</tr>
|
|
|
|
<?php } ?>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
<?php
|
|
|
|
if ($widget['pagination'] && $item_count > $items_per_page) {
|
|
|
|
$url = "$app_root?platform=$platform_id&page=$page";
|
|
|
|
include '../app/helpers/pagination.php';
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
<?php } else { ?>
|
|
|
|
<p class="m-3">No matching records found.</p>
|
|
|
|
<?php } ?>
|
|
|
|
</div>
|
|
|
|
</div>
|
2024-10-04 11:18:28 +00:00
|
|
|
<!-- /widget "<?= htmlspecialchars($widget['name']) ?>" -->
|