$_GET['start'] = isset($_GET['start']) ? $_GET['start'] : 0; $sql = \fr_logsys\Fr\LS::$dbh->prepare("SELECT * FROM `resetTokens` LIMIT :start, 10"); $sql->bindParam(":start", $_GET['start'], \PDO::PARAM_INT); $sql->execute(); if ($sql->rowCount() == 0) { echo sme("No Tokens", "There are currently no tokens stored in the table."); } else { echo "<table><thead><th width='30%'>User</th><th width='50%'>Token</th><th title='YYYY-MM-DD HH:MM:SS' width='20%'>Created</th></thead><tbody>"; while ($r = $sql->fetch()) { ?> <tr> <td title="User ID: <?php echo $r['uid']; ?> "><?php echo \fr_logsys\Fr\LS::getUser("name", $r['uid']); ?> </td> <td><?php echo $r['token']; ?> </td> <td><?php echo $r['requested']; ?> </td> </tr> <?php } echo "</tbody></table>"; echo "<form id='clear_form' action='" . APP_URL . "/admin/tokens' method='POST'><input type='hidden' name='clear_tokens'/><a class='button red' onclick=\"confirm('Are you sure you want to delete all tokens') ? \$('.workspace #clear_form').submit() : '';\">Clear Tokens</a></form>";