|
|
|
@ -6,14 +6,15 @@
|
|
|
|
|
// Join URL contents are not guaranteed to have visible text.
|
|
|
|
|
return $id != "qr" && $id != "preview" && $id != "join_url";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function sort_onclick($colno) {
|
|
|
|
|
global $TABLE_COLUMNS;
|
|
|
|
|
$column = $TABLE_COLUMNS[$colno];
|
|
|
|
|
if (!column_sortable($column['id'])) return "";
|
|
|
|
|
return " onclick='sortTable($colno)' title='Click to sort this column'";
|
|
|
|
|
$name = $column['name'];
|
|
|
|
|
return " title='Click to sort by $name'";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$TABLE_COLUMNS = [
|
|
|
|
|
['id' => "identifier", 'name' => "Identifier"],
|
|
|
|
|
['id' => "language", 'name' => "L"],
|
|
|
|
@ -51,17 +52,29 @@
|
|
|
|
|
|
|
|
|
|
$hostname = explode("//", $room->join_link)[1];
|
|
|
|
|
$hostname = explode("/", $hostname)[0];
|
|
|
|
|
|
|
|
|
|
// Escape external input.
|
|
|
|
|
// Ternaries prevent passing null-equal strings, which produce warnings.
|
|
|
|
|
$id = htmlspecialchars($id);
|
|
|
|
|
$language = $room->language ? htmlspecialchars($room->language) : "";
|
|
|
|
|
$name = htmlspecialchars($room->name);
|
|
|
|
|
$desc = $room->description ? htmlspecialchars($room->description) : "";
|
|
|
|
|
$users = htmlspecialchars($room->active_users);
|
|
|
|
|
$preview_link = htmlspecialchars($room->preview_link);
|
|
|
|
|
$join_link = htmlspecialchars($room->join_link);
|
|
|
|
|
// TODO: Do not forget to rename this escape when merging!
|
|
|
|
|
$token = htmlspecialchars($token);
|
|
|
|
|
$hostname = htmlspecialchars($hostname);
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
|
|
<tr id="<?=$id?>">
|
|
|
|
|
<td class="td_identifier"><?=$id?></td>
|
|
|
|
|
<td class="td_language"><?=$room->language?></td>
|
|
|
|
|
<td class="td_name"><?=$room->name?></td>
|
|
|
|
|
<td class="td_description"
|
|
|
|
|
><?=$room->description?></td>
|
|
|
|
|
<td class="td_users"><?=$room->active_users?></td>
|
|
|
|
|
<td class="td_preview">
|
|
|
|
|
<a href="<?=$room->preview_link?>" target="_blank" rel="noopener noreferrer">
|
|
|
|
|
<tr id="<?=$id?>" itemscope itemtype="https://schema.org/EntryPoint" --data-identifier="<?=$id?>">
|
|
|
|
|
<td class="td_identifier" itemprop="identifier"><?=$id?></td>
|
|
|
|
|
<td class="td_language"><?=$language?></td>
|
|
|
|
|
<td class="td_name" itemprop="name"><?=$name?></td>
|
|
|
|
|
<td class="td_description" itemprop="description"><?=$desc?></td>
|
|
|
|
|
<td class="td_users"><?=$users?></td>
|
|
|
|
|
<td class="td_preview" itemprop="url">
|
|
|
|
|
<a href="<?=$preview_link?>" target="_blank" rel="noopener noreferrer nofollow">
|
|
|
|
|
<?php if (str_starts_with($room->preview_link, 'http://')): ?>
|
|
|
|
|
<span class="protocol-indicator protocol-http">HTTP</span>
|
|
|
|
|
<?php endif; ?>
|
|
|
|
@ -71,26 +84,26 @@
|
|
|
|
|
</a>
|
|
|
|
|
</td>
|
|
|
|
|
<td class="td_qr_code">
|
|
|
|
|
<img
|
|
|
|
|
class="qr-code-icon"
|
|
|
|
|
<img
|
|
|
|
|
class="qr-code-icon"
|
|
|
|
|
src="qrcode-solid.svg"
|
|
|
|
|
onclick='displayQRModal("<?=$id?>")'
|
|
|
|
|
alt="Pictogram of a QR code"
|
|
|
|
|
>
|
|
|
|
|
</td>
|
|
|
|
|
<td class="td_server_icon"
|
|
|
|
|
<td class="td_server_icon"
|
|
|
|
|
data-token="<?=$token?>"
|
|
|
|
|
title="<?=$hostname?> (<?=$token?>)"
|
|
|
|
|
item="image"
|
|
|
|
|
>
|
|
|
|
|
<div class="td_server_icon-circle" style="background-color: <?=$icon_color?>">
|
|
|
|
|
<span><?=strtoupper($token[0] . $token[1])?></span>
|
|
|
|
|
</div>
|
|
|
|
|
</td>
|
|
|
|
|
<td class="td_join_url">
|
|
|
|
|
<div class="join_url_container" data-url="<?=$room->join_link?>">
|
|
|
|
|
<a class="join_url show-from-w5" title="<?=$room->join_link?>"
|
|
|
|
|
><?=truncate($room->join_link, 32)?></a>
|
|
|
|
|
<a class="noscript" href="<?=$room->join_link?>"
|
|
|
|
|
<div class="join_url_container" data-url="<?=$join_link?>">
|
|
|
|
|
<a class="join_url show-from-w5" title="<?=$join_link?>"
|
|
|
|
|
><?=truncate($join_link, 32)?></a>
|
|
|
|
|
<a class="noscript" href="<?=$join_link?>" rel="external nofollow"
|
|
|
|
|
>Copy link</a>
|
|
|
|
|
</div>
|
|
|
|
|
</td>
|
|
|
|
|