blob: bab6410a8475984221b2c59e290d7bfb681b0c1f (
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
|
<?php
$this->layout('readerlayout') ?>
<?php
$this->start('head');
?>
<head>
<?= Wcms\Config::alertcss() ? '<link href="' . Wcms\Model::globalpath() . 'global.css" rel="stylesheet" />' : '' ?>
</head>
<?php
$this->stop();
?>
<?php $this->start('page') ?>
<body class="alert">
<main class="alert">
<?= !empty(Wcms\Config::alerttitle()) ? '<h1>' . Wcms\Config::alerttitle() . '</h1>' : '' ?>
<?php
$form = '<p>
<form action="' . $this->url('log') .'" method="post">
<input type="password" name="pass" id="loginpass" placeholder="password">
<input type="hidden" name="route" value="pageread/">
<input type="hidden" name="id" value="' . $page->id() . '">
<input type="submit" name="log" value="login" id="button">
</form>
</p>';
if(!$pageexist) {
if(!empty(Wcms\Config::existnot())) {
echo '<h2>' . Wcms\Config::existnot() . '</h2>';
}
if(Wcms\Config::existnotpass() && !$canedit) {
echo $form;
}
} else {
switch ($page->secure()) {
case 1:
if(!empty(Wcms\Config::private())) {
echo '<h2>' . Wcms\Config::private() . '</h2>';
}
if(Wcms\Config::privatepass()) {
echo $form;
}
break;
case 2:
if(!empty(Wcms\Config::notpublished())) {
echo '<h2>' . Wcms\Config::notpublished() . '</h2>';
}
if(Wcms\Config::notpublishedpass()) {
echo $form;
}
break;
}
}
if ($canedit) {
?>
<p><a href="<?= $this->upage('pageadd', $page->id()) ?>">⭐ Create</a></p>
<?php
} elseif(!empty(Wcms\Config::alertlink())) {
?>
<p><a href="<?= $this->upage('pageread/', Wcms\Config::alertlink()) ?>"><?= empty(Wcms\Config::alertlinktext()) ? Wcms\Config::alertlink() : Wcms\Config::alertlinktext() ?></a></p>
<?php
}
?>
</main>
</body>
<?php $this->stop() ?>
|