added on WebSTLs (webstls.com) at 2026-07-01 22:27:04
| 1 | <!-- Active sessions manager. Lists every session_row that has not | |
| 2 | been revoked AND not yet expired. The Revoke button on each row | |
| 3 | POSTs to /sessions.cgi action=revoke; "Sign out of every other | |
| 4 | device" revokes everything except the current session. --> | |
| 5 | ||
| 6 | <div class="page-shell" style="max-width:900px;margin:0 auto"> | |
| 7 | ||
| 8 | <div class="mb-3"> | |
| 9 | <a href="/profile.cgi#security" class="text-secondary text-xs" style="text-decoration:none">← Back to Profile</a> | |
| 10 | </div> | |
| 11 | ||
| 12 | <div class="module"> | |
| 13 | <div class="module-head"> | |
| 14 | <div class="left"> | |
| 15 | <div class="module-icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="2" y="3" width="20" height="14" rx="2"/><line x1="8" y1="21" x2="16" y2="21"/><line x1="12" y1="17" x2="12" y2="21"/></svg></div> | |
| 16 | <div> | |
| 17 | <div class="module-title">Active sessions</div> | |
| 18 | <div class="module-sub">$session_count active · revoke individually or sign out everywhere else at once</div> | |
| 19 | </div> | |
| 20 | </div> | |
| 21 | [if:$has_others] | |
| 22 | <form method="POST" action="/sessions.cgi" style="margin:0" | |
| 23 | data-confirm-title="Sign out of every other device?" | |
| 24 | data-confirm-body="Every session except the one you're using right now will be revoked. The other devices will be bounced to the login page on their next request." | |
| 25 | data-confirm-ok="Sign out everywhere else" | |
| 26 | data-confirm-tone="warning"> | |
| 27 | <input type="hidden" name="action" value="revoke_others"> | |
| 28 | <button type="submit" class="btn btn-warning btn-sm">Sign out of every other device</button> | |
| 29 | </form> | |
| 30 | [/if] | |
| 31 | </div> | |
| 32 | ||
| 33 | [if:$ok_flash] | |
| 34 | <div class="module-body" style="border-bottom:1px solid var(--col-border)"> | |
| 35 | <div class="banner success"> | |
| 36 | <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="20 6 9 17 4 12"/></svg> | |
| 37 | <div class="text-sm fw-600">Session revoked.</div> | |
| 38 | </div> | |
| 39 | </div> | |
| 40 | [/if] | |
| 41 | ||
| 42 | [if:$has_sessions] | |
| 43 | <div class="table-wrap" style="border:none;border-radius:0"> | |
| 44 | <table class="table"> | |
| 45 | <thead> | |
| 46 | <tr> | |
| 47 | <th>Device</th> | |
| 48 | <th>IP</th> | |
| 49 | <th>Signed in</th> | |
| 50 | <th>Expires</th> | |
| 51 | <th style="text-align:right">Actions</th> | |
| 52 | </tr> | |
| 53 | </thead> | |
| 54 | <tbody> | |
| 55 | [loop:@sessions] | |
| 56 | <tr> | |
| 57 | <td> | |
| 58 | <strong>$loop1.browser on $loop1.os</strong> | |
| 59 | [if:$loop1.is_current]<span class="pill success" style="margin-left:8px">This device</span>[/if] | |
| 60 | <div class="text-xs text-dim">$loop1.ua_short</div> | |
| 61 | </td> | |
| 62 | <td class="font-mono text-xs text-dim">$loop1.ip</td> | |
| 63 | <td class="text-xs"> | |
| 64 | <div>$loop1.issued</div> | |
| 65 | <div class="text-dim">$loop1.age_label</div> | |
| 66 | </td> | |
| 67 | <td class="text-xs text-dim">$loop1.expires</td> | |
| 68 | <td style="text-align:right"> | |
| 69 | <form method="POST" action="/sessions.cgi" style="display:inline;margin:0" | |
| 70 | data-confirm-title="Revoke this session?" | |
| 71 | data-confirm-body="The device using this session will be bounced to the login page on its next request." | |
| 72 | data-confirm-ok="Revoke session" | |
| 73 | data-confirm-tone="danger"> | |
| 74 | <input type="hidden" name="action" value="revoke"> | |
| 75 | <input type="hidden" name="sid" value="$loop1.sid"> | |
| 76 | [if:$loop1.is_current] | |
| 77 | <button type="submit" class="btn btn-secondary btn-sm">Sign out</button> | |
| 78 | [/if] | |
| 79 | [if:!$loop1.is_current] | |
| 80 | <button type="submit" class="btn btn-danger btn-sm">Revoke</button> | |
| 81 | [/if] | |
| 82 | </form> | |
| 83 | </td> | |
| 84 | </tr> | |
| 85 | [/loop] | |
| 86 | </tbody> | |
| 87 | </table> | |
| 88 | </div> | |
| 89 | [/if] | |
| 90 | ||
| 91 | [if:!$has_sessions] | |
| 92 | <div class="module-body" style="text-align:center;padding:40px 20px;color:var(--col-text-2)"> | |
| 93 | No active sessions found. (That shouldn't happen if you're reading this page…) | |
| 94 | </div> | |
| 95 | [/if] | |
| 96 | </div> | |
| 97 | ||
| 98 | </div> |