aboutsummaryrefslogtreecommitdiff
path: root/app/view/templates
diff options
context:
space:
mode:
authorvincent-peugnet <v.peugnet@free.fr>2020-04-09 02:17:47 +0200
committervincent-peugnet <v.peugnet@free.fr>2020-04-09 02:17:47 +0200
commit0e66e1d890ca775b50b43990a4d92c035c1eb5b2 (patch)
tree16f56864ad5686a337d03de326041e518481d22a /app/view/templates
parent1270f3300998afbc5defab832e02cc831f486d9f (diff)
downloadwcms-0e66e1d890ca775b50b43990a4d92c035c1eb5b2.tar.gz
wcms-0e66e1d890ca775b50b43990a4d92c035c1eb5b2.zip
feature : cookie session management
Diffstat (limited to 'app/view/templates')
-rw-r--r--app/view/templates/user.php29
1 files changed, 26 insertions, 3 deletions
diff --git a/app/view/templates/user.php b/app/view/templates/user.php
index f7b2b25..ca944fd 100644
--- a/app/view/templates/user.php
+++ b/app/view/templates/user.php
@@ -10,7 +10,7 @@
<main class="user">
- <section>
+ <section id="pref">
<div class="block">
@@ -36,12 +36,35 @@
<p>
<input type="number" name="cookie" value="<?= $getuser->cookie() ?>" id="cookie" min="0" max="365">
<label for="cookie">Cookie conservation time <i>(In days)</i></label>
+ <p>When you tick the <em>remember-me</em> checkbox during login, you can choose how much time <strong>W</strong> will remember you.</p>
<input type="submit" value="submit">
</p>
</form>
+
+
+ <h2>Sessions Tokens</h2>
+
+ <ul>
+
+ <?php foreach ($tokenlist as $token ) {
+ ?>
+ <li >
+ <code>
+ ip : <?= $token->ip ?> | date : <?= $token->date['date'] ?> | conservation : <?= $token->conservation ?> days | user agent : <?= $token->useragent ?>
+ </code>
+ <form action="<?= $this->url('usertoken') ?>" method="post">
+ <input type="hidden" name="tokendelete" value="<?= $token->getId() ?>" >
+ <input type="submit" value="delete">
+ </form>
+
+ </li>
+ <?php
+ } ?>
+ </ul>
+
</div>
@@ -89,7 +112,7 @@
</select>
</td>
<td>
- <input type="date" name="expiredate" id="expiredate" min="<?= $now ?>">
+ <input type="date" name="expiredate" id="expiredate" min="<?= $now->format('Y-m-d'); ?>">
</td>
<td>
<input type="submit" value="add">
@@ -136,7 +159,7 @@
<td>
- <input type="date" name="expiredate" id="expiredate"<?= $user->expiredate() !== false ? 'value="' . $user->expiredate('string') . '"' : '' ?>>
+ <input type="date" name="expiredate" id="expiredate"<?= $user->expiredate() !== false ? 'value="' . $user->expiredate('string') . '"' : '' ?> min="<?= $now->format('Y-m-d'); ?>">
<span>reset<input type="checkbox" name="expiredate" id="expiredate" value="null"></span>
</td>