aboutsummaryrefslogtreecommitdiff
path: root/app/view
diff options
context:
space:
mode:
Diffstat (limited to 'app/view')
-rw-r--r--app/view/templates/backtopbar.php3
-rw-r--r--app/view/templates/connect.php3
-rw-r--r--app/view/templates/homeopt.php2
-rw-r--r--app/view/templates/user.php29
4 files changed, 33 insertions, 4 deletions
diff --git a/app/view/templates/backtopbar.php b/app/view/templates/backtopbar.php
index c1dd361..0710c85 100644
--- a/app/view/templates/backtopbar.php
+++ b/app/view/templates/backtopbar.php
@@ -63,6 +63,9 @@ if($user->isadmin()) {
<form action="<?= $this->url('log') ?>" method="post" id="connect">
<input type="password" name="pass" id="loginpass" placeholder="password" autofocus>
<input type="hidden" name="route" value="home">
+<input type="hidden" name="rememberme" value="0">
+<input type="checkbox" name="rememberme" id="rememberme" value="1">
+<label for="rememberme">Remember me</label>
<input type="submit" name="log" value="login">
</form>
diff --git a/app/view/templates/connect.php b/app/view/templates/connect.php
index e21b360..6fd5b14 100644
--- a/app/view/templates/connect.php
+++ b/app/view/templates/connect.php
@@ -19,6 +19,9 @@ if(in_array($route, ['pageedit', 'pageread', 'pageread/', 'pageadd'])) {
}
?>
<input type="password" name="pass" id="loginpass" placeholder="password" autofocus>
+<input type="hidden" name="rememberme" value="0">
+<input type="checkbox" name="rememberme" id="rememberme" value="1">
+<label for="rememberme">Remember me</label>
<input name="log" type="submit" value="login">
</form>
diff --git a/app/view/templates/homeopt.php b/app/view/templates/homeopt.php
index ed7315d..b720aea 100644
--- a/app/view/templates/homeopt.php
+++ b/app/view/templates/homeopt.php
@@ -16,7 +16,7 @@
<legend>Sort</legend>
<select name="sortby" id="sortby">
<?php
- foreach ($opt->col('array') as $key => $col) {
+ foreach (Wcms\Model::COLUMNS as $col) {
echo '<option value="' . $col . '" ' . ($opt->sortby() == $col ? "selected" : "") . '>' . $col . '</option>';
}
?>
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>