blob: e21b3607c4e3a7e4bd37063a25ad3b4a19acd66a (
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
|
<?php $this->layout('layout', ['title' => 'Connect', 'description' => 'connect', 'stylesheets' => [$css . 'home.css']]) ?>
<?php $this->start('page') ?>
<span>
<?= $user->level() ?>
</span>
<?php if($user->isvisitor()) { ?>
<form action="<?= $this->url('log') ?>" method="post">
<input type="hidden" name="route" value="<?= $route ?>">
<?php
if(in_array($route, ['pageedit', 'pageread', 'pageread/', 'pageadd'])) {
echo '<input type="hidden" name="id" value="'. $id .'">';
}
?>
<input type="password" name="pass" id="loginpass" placeholder="password" autofocus>
<input name="log" type="submit" value="login">
</form>
<?php } else { ?>
<form action="<?= $this->url('log') ?>" method="post">
<input name="log" type="submit" value="logout">
</form>
<?php } ?>
<?php
if(in_array($route, ['pageedit', 'pageread', 'pageread/', 'pageadd'])) {
echo '<p><a href="' . $this->upage('pageread/', $id) . '">back to page read view</a></p>';
}
?>
<?php $this->stop() ?>
|