aboutsummaryrefslogtreecommitdiff
path: root/app/view/templates/backtopbar.php
blob: c1dd361ce5fe38e9111e9ea7c87bfa1ff82947db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<header id="topbar">

<span id="search" class="hidephone">
<form action="<?= $this->url('search') ?>" method="post">
<input type="text" list="searchdatalist" name="id" id="search" placeholder="page id" required <?= $tab !== 'edit' && !$user->isvisitor() ? 'autofocus' : '' ?>>
<input type="submit" name="action" value="read">
<?= $user->iseditor() ? '<input type="submit" name="action" value="edit">' : '' ?>

<?php if($user->iseditor()) { ?>
<datalist id="searchdatalist">
    <?php foreach ($pagelist as $id) { ?>
        <option value="<?= $id ?>"><?= $id ?></option>
    <?php } ?>
</datalist>
<?php } ?>

</form>
</span>



<?php if($user->iseditor()) { ?>

<span id="menu">
<a href="<?= $this->url('home') ?>" <?= $tab == 'home' ? 'class="actualpage"' : '' ?>>
    <img src="<?= Wcms\Model::iconpath() ?>home.png" alt="" class="icon">
    <span class="hidephone">home</span>
</a>
<a href="<?= $this->url('media') ?>" <?= $tab == 'media' ? 'class="actualpage"' : '' ?>>
    <img src="<?= Wcms\Model::iconpath() ?>media.png" alt="" class="icon">
    <span class="hidephone">media</span>
</a>
<?php
if($user->isadmin()) {
?>
<a href="<?= $this->url('admin') ?>" <?= $tab == 'admin' ? 'class="actualpage"' : '' ?>>
    <img src="<?= Wcms\Model::iconpath() ?>admin.png" alt="" class="icon">
    <span class="hidephone">admin</span>

</a>
<?php
}
?>
<a href="<?= $this->url('info') ?>"  <?= $tab == 'info' ? 'class="actualpage"' : '' ?>>
    <img src="<?= Wcms\Model::iconpath() ?>info.png" alt="" class="icon">
    <span class="hidephone">info</span>
</a>
</span>





<?php } ?>



<span id="user">

<?php if($user->isvisitor()) { ?>


<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="submit" name="log" value="login">
</form>


<?php } else { ?>  

<span>

<a href="<?= $this->url('user') ?>" <?= $tab == 'user' ? 'class="actualpage"' : '' ?>>
    <img src="<?= Wcms\Model::iconpath() ?>user.png" alt="" class="icon">
    <span class="hidephone"><?= $user->id() ?></span>
</a>
<i><?= $user->level() ?></i>
</span>


<form action="<?= $this->url('log') ?>" method="post" id="connect">
<input type="submit" name="log" value="logout" >
<?php if($tab === 'edit') { ?>
    <input type="hidden" name="route" value="pageread/">
    <input type="hidden" name="id" value="<?= $pageid ?>">
<?php } ?>

</form>



</span>




<?php } ?>

</header>
t type="checkbox" name="tagfilter[]" id="tag_' . $tagfilter . '" value="' . $tagfilter . '" /><label for="tag_' . $tagfilter . '">' . $tagfilter . ' (' . $count . ')</label></li>'; } } if ($in = true || $out = true) { echo '</details>'; } ?> </ul> </fieldset> <fieldset> <legend>Author(s)</legend> <ul> <input type="radio" id="author_OR" name="authorcompare" value="OR" ' . <?= $opt->authorcompare() == "OR" ? "checked" : "" ?>><label for="author_OR">OR</label> <input type="radio" id="author_AND" name="authorcompare" value="AND" <?= $opt->authorcompare() == "AND" ? "checked" : "" ?>><label for="author_AND">AND</label> <?php $in = false; $out = false; $limit = 1; foreach ($opt->authorlist() as $authorfilter => $count) { if ($count > $limit && $in == false) { echo '<details open><summary>>' . $limit . '</summary>'; $in = true; } if ($count == $limit && $in == true && $out == false) { echo '</details><details><summary>' . $limit . '</summary>'; $out = true; } if (in_array($authorfilter, $opt->authorfilter())) { echo '<li><input type="checkbox" name="authorfilter[]" id="author_' . $authorfilter . '" value="' . $authorfilter . '" checked /><label for="author_' . $authorfilter . '">' . $authorfilter . ' (' . $count . ')</label></li>'; } else { echo '<li><input type="checkbox" name="authorfilter[]" id="author_' . $authorfilter . '" value="' . $authorfilter . '" /><label for="author_' . $authorfilter . '">' . $authorfilter . ' (' . $count . ')</label></li>'; } } if ($in = true || $out = true) { echo '</details>'; } ?> </ul> </fieldset> <fieldset> <legend>Other</legend> <?php if ($opt->invert() == 1) { echo '<input type="checkbox" name="invert" value="1" id="invert" checked>'; } else { echo '<input type="checkbox" name="invert" value="1" id="invert">'; } echo '<label for="invert">invert</></br>'; ?> <input type="number" name="limit" id="limit" value="<?= $opt->limit() ?>" min="0" max="9999"> <label for="limit">limit</label> </fieldset> </div> <input type="submit" name="submit" value="filter"><input type="submit" name="submit" value="reset"> </form> </div> </div> </nav>