diff options
author | vincent-peugnet <v.peugnet@free.fr> | 2019-08-09 02:56:29 +0200 |
---|---|---|
committer | vincent-peugnet <v.peugnet@free.fr> | 2019-08-09 02:56:29 +0200 |
commit | 49f827b172dd3c07e3c4562a261557feb1ef03f6 (patch) | |
tree | c24e1ff26ccfcd4451de660e5307353b5d787b02 /app/view/templates | |
parent | 87ca0b50e624feacd2caff2057c5ebfb62a7977f (diff) | |
download | wcms-49f827b172dd3c07e3c4562a261557feb1ef03f6.tar.gz wcms-49f827b172dd3c07e3c4562a261557feb1ef03f6.zip |
Feature : Users may expire
- user have expiredate
- admins can set up this date
Diffstat (limited to 'app/view/templates')
-rw-r--r-- | app/view/templates/user.php | 39 |
1 files changed, 34 insertions, 5 deletions
diff --git a/app/view/templates/user.php b/app/view/templates/user.php index 7512267..4717ee6 100644 --- a/app/view/templates/user.php +++ b/app/view/templates/user.php @@ -16,17 +16,26 @@ <h1>User : <?= $user->id() ?></h1> +<h2>Infos</h2> + + +<p>Connections count : <?= $getuser->connectcount() ?></p> + +<p>Account will expire in : <?= $getuser->expiredate('hrdi') ?></p> -<form action="<?= $this->url('userpref') ?>" method="post"> <h2>Preferences</h2> -<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> -<input type="submit" value="submit"> +<form action="<?= $this->url('userpref') ?>" method="post"> +<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> + <input type="submit" value="submit"> +</p> + </form> </article> @@ -40,7 +49,7 @@ <table> <tr> -<th>id</th><th>password</th><th>hash</th><th>level</th><th>action</th> +<th>id</th><th>password</th><th>hash</th><th>level</th><th>set expiration date</th><th>action</th><th>expire</th> </tr> <tr> @@ -67,8 +76,14 @@ </select> </td> <td> + <input type="date" name="expiredate" id="expiredate" min="<?= $now ?>"> + </td> + <td> <input type="submit" value="add"> </td> + <td> + + </td> </form> </tr> @@ -102,6 +117,13 @@ foreach ($userlist as $user ) { </select> </td> + + <td> + <input type="date" name="expiredate" id="expiredate"<?= $user->expiredate() !== false ? 'value="' . $user->expiredate('string') . '"' : '' ?>> + <span>reset<input type="checkbox" name="expiredate" id="expiredate" value="null"></span> + + </td> + <td> <input type="hidden" name="id" value="<?= $user->id() ?>"> <input type="submit" name="action" value="update"> @@ -110,6 +132,13 @@ foreach ($userlist as $user ) { </td> + + + <td> + <?= $user->expiredate('hrdi') ?> + </td> + + </tr> <?php |