diff options
author | vincent-peugnet <v.peugnet@free.fr> | 2019-01-12 14:53:41 +0100 |
---|---|---|
committer | vincent-peugnet <v.peugnet@free.fr> | 2019-01-12 14:53:41 +0100 |
commit | 393709dcf84776c760146722560816172167fe98 (patch) | |
tree | 4b5c1f24beae72a0ed9e6535f725031b46be165d /app/view/templates | |
parent | 19458f7fc46c5a275f9a04b9e80fdf8175c85c6e (diff) | |
download | wcms-393709dcf84776c760146722560816172167fe98.tar.gz wcms-393709dcf84776c760146722560816172167fe98.zip |
visit counter
Diffstat (limited to 'app/view/templates')
-rw-r--r-- | app/view/templates/home.php | 10 | ||||
-rw-r--r-- | app/view/templates/homeopt.php | 32 | ||||
-rw-r--r-- | app/view/templates/user.php | 16 |
3 files changed, 49 insertions, 9 deletions
diff --git a/app/view/templates/home.php b/app/view/templates/home.php index 6fcb0c8..5860975 100644 --- a/app/view/templates/home.php +++ b/app/view/templates/home.php @@ -22,7 +22,7 @@ <div id="flex"> - <?php $this->insert('homeopt', ['opt' => $opt]) ?> + <?php $this->insert('homeopt', ['opt' => $opt, 'user' => $user]) ?> @@ -63,12 +63,12 @@ <th class="datecreation"><a href="<?= $opt->getadress('datecreation') ?>">date of creation</a></th> <th class="date"><a href="<?= $opt->getadress('date') ?>">date</a></th> <th class="secure"><a href="<?= $opt->getadress('secure') ?>">privacy</a></th> - <th class="affcount"><a href="<?= $opt->getadress('affcount') ?>">affcount</a></th> + <th class="visitcount"><a href="<?= $opt->getadress('visitcount') ?>">visit</a></th> </tr> <?php foreach ($table2 as $item) { ?> <tr> - <td><input type="checkbox" name="id[]" value="<?= $item->id() ?>" id="<?= $item->id() ?>"></td> - <td><label title="<?= $item->title() ?>" for="<?= $item->id() ?>"><?= $item->id() ?></label></td> + <td><input type="checkbox" name="id[]" value="<?= $item->id() ?>" id="id_<?= $item->id() ?>"></td> + <td><label title="<?= $item->title() ?>" for="id_<?= $item->id() ?>"><?= $item->id() ?></label></td> <td><a href="<?= $this->uart('artedit', $item->id()) ?>">✏</a></td> <td><a href="<?= $this->uart('artread/', $item->id()) ?>" target="_blank">👁</a></td> <td class="delete"><a href="<?= $this->uart('artdelete', $item->id()) ?>" >✖</a></td> @@ -80,7 +80,7 @@ <td class="datecreation"><?= $item->datecreation('hrdi') ?></td> <td class="date"><?= $item->date('dmy') ?></td> <td class="secure"><?= $item->secure('string') ?></td> - <td class="affcount"><?= $item->affcount() ?></td> + <td class="visitcount"><?= $item->visitcount() ?></td> </tr> <?php }?> diff --git a/app/view/templates/homeopt.php b/app/view/templates/homeopt.php index a37e65b..5dab881 100644 --- a/app/view/templates/homeopt.php +++ b/app/view/templates/homeopt.php @@ -51,9 +51,9 @@ foreach ($opt->taglist() as $tagfilter => $count) { if (in_array($tagfilter, $opt->tagfilter())) { - echo '<li><input type="checkbox" name="tagfilter[]" id="' . $tagfilter . '" value="' . $tagfilter . '" checked /><label for="' . $tagfilter . '">' . $tagfilter . ' (' . $count . ')</label></li>'; + echo '<li><input type="checkbox" name="tagfilter[]" id="tag_' . $tagfilter . '" value="' . $tagfilter . '" checked /><label for="tag_' . $tagfilter . '">' . $tagfilter . ' (' . $count . ')</label></li>'; } else { - echo '<li><input type="checkbox" name="tagfilter[]" id="' . $tagfilter . '" value="' . $tagfilter . '" /><label for="' . $tagfilter . '">' . $tagfilter . ' (' . $count . ')</label></li>'; + echo '<li><input type="checkbox" name="tagfilter[]" id="tag_' . $tagfilter . '" value="' . $tagfilter . '" /><label for="tag_' . $tagfilter . '">' . $tagfilter . ' (' . $count . ')</label></li>'; } } if ($in = true || $out = true) { @@ -78,5 +78,33 @@ if ($in = true || $out = true) { <input type="submit" name="submit" value="filter"> ⬅<input type="submit" name="submit" value="reset"> +<?php if($user->isadmin()) { ?> + </form> + +<h2>Columns</h2> + +<form action="" method="post"> + +<ul> + +<?php + +foreach ($opt->col() as $col) { + ?> + <li> + <input type="checkbox" name="col[]" id="col_<?= $col ?>"> + <label for="col_<?= $col ?>"><?= $col ?></label> + </li> + <?php +} + +?> + +</ul> + +</form> + +<?php } ?> + </div> diff --git a/app/view/templates/user.php b/app/view/templates/user.php index 957f17f..d97cc31 100644 --- a/app/view/templates/user.php +++ b/app/view/templates/user.php @@ -11,12 +11,22 @@ <main class="user"> -<div> <h1>User : <?= $user->id() ?></h1> -</div> +<form action="" method="post"> + +<h2>Connexion Options</h2> + +<input type="number" name="cookie" id="cookie"> +<label for="cookie">Cookie conservation time <i>(In days)</i></label> + +<input type="submit" value="submit"> + +</form> + +<h1>Admin panel</h1> <table> <tr> @@ -88,6 +98,8 @@ foreach ($userlist as $user ) { </table> + + </main> </body> |