<div class="container-fluid">

<div class="mb-4">
    <h2 class="fw-bold">
        CrossRef XML Export Center
    </h2>
</div>

<div class="card border-0 shadow-sm">

<div class="card-header fw-bold">
CrossRef Readiness
</div>

<div class="table-responsive">

<table class="table table-striped align-middle">

<thead>
<tr>
    <th>ID</th>
    <th>Submission</th>
    <th>Title</th>
    <th>DOI</th>
    <th>Issue</th>
    <th>Volume</th>
    <th>Galley</th>
    <th>XML Score</th>
</tr>
</thead>

<tbody>

<?php foreach($rows as $r): ?>

<tr>

<td>
<?= (int)$r['id'] ?>
</td>

<td>
<?= htmlspecialchars($r['submission_no']) ?>
</td>

<td>
<?= htmlspecialchars($r['title']) ?>
</td>

<td>
<?= htmlspecialchars($r['doi'] ?? '') ?>
</td>

<td>
<?= (int)($r['issue_id'] ?? 0) ?>
</td>

<td>
<?= htmlspecialchars(
    ($r['volume_no'] ?? '')
    . '/'
    .
    ($r['issue_no'] ?? '')
) ?>
</td>

<td>
<?= (int)($r['galley_id'] ?? 0) ?>
</td>

<td>

<?php

$score =
(int)$r['xml_score'];

$cls =
$score >= 100
? 'success'
:
(
    $score >= 75
    ? 'warning'
    : 'danger'
);

?>

<span class="badge bg-<?= $cls ?>">
<?= $score ?>%
</span>

</td>

</tr>

<?php endforeach; ?>

</tbody>

</table>

</div>

</div>

</div>
