-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.php
275 lines (247 loc) · 8.33 KB
/
main.php
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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
<?php
/**
* DokuWiki Arctic Template
*
* This is the template you need to change for the overall look
* of DokuWiki.
*
* You should leave the doctype at the very top - It should
* always be the very first line of a document.
*
* @author Andreas Gohr <andi@splitbrain.org>
* @author Michael Klier <chi@chimeric.de>
* @link http://wiki.splitbrain.org/template:arctic
* @link http://chimeric.de/projects/dokuwiki/template/arctic
*/
// must be run from within DokuWiki
if (!defined('DOKU_INC')) die();
// include custom arctic template functions
require_once(dirname(__FILE__).'/tpl_functions.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $conf['lang']?>"
lang="<?php echo $conf['lang']?>" dir="<?php echo $lang['direction']?>">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
<?php echo strip_tags($conf['title_short'])?>
- <?php tpl_pagetitle()?>
</title>
<?php tpl_metaheaders()?>
<link rel="shortcut icon" href="<?php echo DOKU_TPL?>images/favicon.png" />
<?php /*old includehook*/ @include(dirname(__FILE__).'/meta.html')?>
</head>
<body>
<?php /*old includehook*/ @include(dirname(__FILE__).'/topheader.html')?>
<div id="wrapper">
<div class="dokuwiki">
<?php html_msgarea()?>
<div class="stylehead">
<div class="header">
<div class="pagename">
<?php print $conf['title']; #.' - '.tpl_pagetitle($ID, true);
?>
<!-- AE
[[<?php tpl_link(wl($ID,'do=backlink'),tpl_pagetitle($ID,true))?>]]
-->
</div>
<div class="logo">
<?php tpl_link(wl(),
"<img src=\"".DOKU_TPL."/images/logo.png\" alt=\"$conf[title]\" height=\"80\" />",
'name="dokuwiki__top" accesskey="h" title="[ALT+H]"');
?>
</div>
</div>
<?php if(tpl_getConf('trace')) {?>
<div class="breadcrumbs">
<?php ($conf['youarehere'] != 1) ? tpl_breadcrumbs() : tpl_youarehere();?>
</div>
<?php } ?>
<?php /*old includehook*/ @include(dirname(__FILE__).'/header.html')?>
</div>
<?php if(!$toolb) { ?>
<?php if(!tpl_getConf('hideactions') || tpl_getConf('hideactions') && isset($_SERVER['REMOTE_USER'])) { ?>
<div class="bar" id="bar__top">
<div class="bar-left">
<?php
if(!tpl_getConf('closedwiki') || (tpl_getConf('closedwiki') && isset($_SERVER['REMOTE_USER']))) {
switch(tpl_getConf('wiki_actionlinks')) {
case('buttons'):
// check if new page button plugin is available
if(!plugin_isdisabled('npd') && ($npd =& plugin_load('helper', 'npd'))) {
$npd->html_new_page_button();
}
tpl_button('edit');
tpl_button('history');
break;
case('links'):
// check if new page button plugin is available
if(!plugin_isdisabled('npd') && ($npd =& plugin_load('helper', 'npd'))) {
$npd->html_new_page_button();
}
tpl_actionlink('edit');
tpl_actionlink('history');
break;
}
}
?>
</div>
<div class="bar-right">
<?php
switch(tpl_getConf('wiki_actionlinks')) {
case('buttons'):
if(!tpl_getConf('closedwiki') || (tpl_getConf('closedwiki') && isset($_SERVER['REMOTE_USER']))) {
tpl_button('admin');
tpl_button('revert');
tpl_button('profile');
tpl_button('recent');
tpl_button('index');
tpl_button('login');
if(tpl_getConf('sidebar') == 'none') tpl_searchform();
} else {
tpl_button('login');
}
break;
case('links'):
if(!tpl_getConf('closedwiki') || (tpl_getConf('closedwiki') && isset($_SERVER['REMOTE_USER']))) {
tpl_actionlink('admin');
tpl_actionlink('revert');
tpl_actionlink('profile');
tpl_actionlink('recent');
tpl_actionlink('index');
tpl_actionlink('login');
if(tpl_getConf('sidebar') == 'none') tpl_searchform();
} else {
tpl_actionlink('login');
}
break;
}
?>
</div>
</div>
<?php }
else {
echo "<hr>";
}
?>
<?php } ?>
<?php /*old includehook*/ @include(dirname(__FILE__).'/pageheader.html')?>
<?php flush()?>
<?php if(tpl_getConf('sidebar') == 'left') { ?>
<?php if(!tpl_sidebar_hide()) { ?>
<div class="left_sidebar">
<?php tpl_searchform() ?>
<?php tpl_sidebar('left') ?>
</div>
<div class="right_page">
<?php ($notoc) ? tpl_content(false) : tpl_content() ?>
</div>
<?php } else { ?>
<div class="page">
<?php tpl_content()?>
</div>
<?php } ?>
<?php } elseif(tpl_getConf('sidebar') == 'right') { ?>
<?php if(!tpl_sidebar_hide()) { ?>
<div class="left_page">
<?php ($notoc) ? tpl_content(false) : tpl_content() ?>
</div>
<div class="right_sidebar">
<?php tpl_searchform() ?>
<?php tpl_sidebar('right') ?>
<?php if (!isset($_SERVER['REMOTE_USER'])) {
print "<div style=\"text-align:right\">";
tpl_button('login');
print "</div>";
}
?>
</div>
<?php } else { ?>
<div class="page">
<?php tpl_content() ?>
</div>
<?php }?>
<?php } elseif(tpl_getConf('sidebar') == 'both') { ?>
<?php if(!tpl_sidebar_hide()) { ?>
<div class="left_sidebar">
<?php if(tpl_getConf('search') == 'left') tpl_searchform() ?>
<?php tpl_sidebar('left') ?>
</div>
<div class="center_page">
<?php ($notoc) ? tpl_content(false) : tpl_content() ?>
</div>
<div class="right_sidebar">
<?php if(tpl_getConf('search') == 'right') tpl_searchform() ?>
<?php tpl_sidebar('right') ?>
</div>
<?php } else { ?>
<div class="page">
<?php tpl_content()?>
</div>
<?php }?>
<?php } elseif(tpl_getConf('sidebar') == 'none') { ?>
<div class="page">
<?php tpl_content() ?>
</div>
<?php } ?>
<div class="stylefoot">
<div class="meta">
<div class="user">
<?php tpl_userinfo()?>
</div>
<div class="doc">
<?php if (isset($_SERVER['REMOTE_USER'])) tpl_pageinfo()?>
</div>
</div>
</div>
<div class="clearer"></div>
<?php flush()?>
<?php if(!$toolb) { ?>
<?php if(!tpl_getConf('hideactions') || tpl_getConf('hideactions') && isset($_SERVER['REMOTE_USER'])) { ?>
<?php if(!tpl_getConf('closedwiki') || (tpl_getConf('closedwiki') && isset($_SERVER['REMOTE_USER']))) { ?>
<div class="bar" id="bar__bottom">
<div class="bar-left">
<?php
switch(tpl_getConf('wiki_actionlinks')) {
case('buttons'):
tpl_button('edit');
tpl_button('history');
break;
case('links'):
tpl_actionlink('edit');
tpl_actionlink('history');
break;
}
?>
</div>
<div class="bar-right">
<?php
switch(tpl_getConf('wiki_actionlinks')) {
case('buttons'):
tpl_button('subscription');
tpl_button('top');
break;
case('links'):
tpl_actionlink('subscribe');
tpl_actionlink('subscribens');
tpl_actionlink('top');
break;
}
?>
</div>
</div>
<div class="clearer"></div>
<?php } ?>
<?php } else
{
echo "<hr>";
}
?>
<?php } ?>
<?php /*old includehook*/ @include(dirname(__FILE__).'/footer.html')?>
</div>
</div>
<div class="no"><?php /* provide DokuWiki housekeeping, required in all templates */ tpl_indexerWebBug()?></div>
</body>
</html>