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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
|
<?php $this->layout('layout', ['title' => 'home', 'css' => $css . 'home.css', 'favicon' => '']) ?>
<?php $this->start('page') ?>
<body>
<?php $this->insert('backtopbar', ['user' => $user, 'tab' => 'home']) ?>
<?php if($user->iseditor()) { ?>
<main class="home">
</div>
<div id="flex">
<?php $this->insert('homeopt', ['opt' => $opt, 'user' => $user]) ?>
<div id="main">
<h2>Pages</h2>
<form action="/massedit" method="post">
<div id="massedit">
<select name="massedit" required>
<option value="public">set as public</option>
<option value="private">set as private</option>
<option value="not published">set as not published</option>
<option value="erasetag">erase all tags</option>
<option value="erasetemplate">erase template</option>
<option value="delete">delete</option>
<option value="render">render</option>
</select>
<input type="submit" name="massaction" value="do" onclick="confirmSubmit(event, 'Are you sure')" >
<?php
$array = ['id' => [ 'getadress' => true,
'label' => 'id',
'show' => true]
]
?>
<input type="hidden" name="action" value="massedit">
</div>
<table id="home2table">
<tr>
<th>x</th>
<th><a href="<?= $opt->getadress('id') ?>">id</a></th>
<th>edit</th>
<th>see</th>
<th class="delete">del</th>
<?php if($user->isadmin()) { ?>
<th class="download">dl</th>
<?php } if($columns['tag']) { ?>
<th class="tag"><a href="<?= $opt->getadress('tag') ?>">tag</a></th>
<?php } if($columns['description']) { ?>
<th class="summary">summary</th>
<?php } if($columns['linkto']) { ?>
<th class="linkto"><a href="<?= $opt->getadress('linkto') ?>">to</a></th>
<?php } if($columns['linkfrom']) { ?>
<th class="linkfrom"><a href="<?= $opt->getadress('linkfrom') ?>">from</a></th>
<?php } if($columns['datemodif']) { ?>
<th class="datemodif"><a href="<?= $opt->getadress('datemodif') ?>">last modification</a></th>
<?php } if($columns['datecreation']) { ?>
<th class="datecreation"><a href="<?= $opt->getadress('datecreation') ?>">date of creation</a></th>
<?php } if($columns['date']) { ?>
<th class="date"><a href="<?= $opt->getadress('date') ?>">date</a></th>
<?php } if($columns['secure']) { ?>
<th class="secure"><a href="<?= $opt->getadress('secure') ?>">privacy</a></th>
<?php } if($columns['visitcount']) { ?>
<th class="visitcount"><a href="<?= $opt->getadress('visitcount') ?>">visit</a></th>
<?php } if($columns['editcount']) { ?>
<th class="editcount"><a href="<?= $opt->getadress('editcount') ?>">edit</a></th>
<?php } if($columns['affcount']) { ?>
<th class="affcount"><a href="<?= $opt->getadress('affcount') ?>">aff</a></th>
<?php } ?>
</tr>
<?php foreach ($table2 as $item) { ?>
<tr>
<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>
<?php if($user->isadmin()) { ?>
<td><a href="<?= $this->uart('artdownload', $item->id()) ?>" download>↓</a></td>
<?php } if($columns['tag']) { ?>
<td class="tag"><a title="<?= $item->tag('string') ?>"><?= $item->tag('sort') ?></a></td>
<?php } if($columns['description']) { ?>
<td class="summary" title="<?= $item->description() ?>"><?= $item->description('short') ?></td>
<?php } if($columns['linkto']) { ?>
<td class="linkto"><a title="<?= $item->linkto('string') ?>" ><?= $item->linkto('sort') ?></a></td>
<?php } if($columns['linkfrom']) { ?>
<td class="linkfrom"><a title="<?= $item->linkfrom('string') ?>" ><?= $item->linkfrom('sort') ?></a></td>
<?php } if($columns['datemodif']) { ?>
<td class="datemodif"><?= $item->datemodif('hrdi') ?></td>
<?php } if($columns['datecreation']) { ?>
<td class="datecreation"><?= $item->datecreation('hrdi') ?></td>
<?php } if($columns['date']) { ?>
<td class="date"><?= $item->date('dmy') ?></td>
<?php } if($columns['secure']) { ?>
<td class="secure"><?= $item->secure('string') ?></td>
<?php } if($columns['visitcount']) { ?>
<td class="visitcount"><?= $item->visitcount() ?></td>
<?php } if($columns['editcount']) { ?>
<td class="editcount"><?= $item->editcount() ?></td>
<?php } if($columns['affcount']) { ?>
<td class="affcount"><?= $item->affcount() ?></td>
<?php } ?>
</tr>
<?php }?>
</table>
</form>
</div>
</div>
</main>
<?php } ?>
</body>
<?php $this->stop() ?>
|