-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.php
174 lines (146 loc) · 4.74 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
<?php
/**
* DokuWiki DokuKIT Template, based on DokuCMS
*
* @link https://github.com/particleKIT/dokuKIT
* @author Martin Gabelmann <[email protected]>
*/
// must be run from within DokuWiki
if (!defined('DOKU_INC')) die();
// include custom template functions stolen from arctic template
require_once(dirname(__FILE__).'/tpl_functions.php');
// load translation plugin (if present)
$translation = plugin_load('helper','translation');
echo '
<!DOCTYPE html>
<html lang="', $conf['lang'], '" dir="', $lang['direction'], '">
<head>
<meta charset="utf-8" />
<title>', tpl_getConf("title_prefix"),
// print title without language namespace
preg_replace('/^'.$conf['lang'].':/','',tpl_pagetitle(null, true)), '</title>',
// set viewport for mobile devices
'<meta name="viewport" content="width=device-width, initial-scale=1.0">';
tpl_metaheaders();
echo tpl_favicon(array('favicon', 'mobile')), '
</head>
<body>
<div class="dokuwiki">
<div id="wrapper">';
html_msgarea();
// print the upper navigation with translation and login buttons
echo '<div id="metanavigation">';
tpl_link(wl(),'HOME','name="dokuwiki__top" id="dokuwiki__top"');
tpl_link('https://www.kit.edu/impressum.php', tpl_getLang('imprint'));
tpl_link('https://www.kit.edu/', 'KIT');
if ($translation) {
if(!$_SERVER['REMOTE_USER']) $conf['plugin']['translation']['checkage'] = 0;
echo $translation->showTranslations();
if(null != tpl_getConf("institute_".$conf['lang'])) $conf['title'] = tpl_getConf("institute_".$conf['lang']);
}
// various user buttons
tpl_button('admin');
if($_SERVER['REMOTE_USER']) tpl_button('profile');
if($ACT != 'login' && $ACT != 'logout' && $_SERVER['REMOTE_USER'] || tpl_getConf("showlogin")) tpl_button('login');
echo '
</div>
<div id="head">
<div id="logo">
<a href="https://www.kit.edu" title="'.tpl_getLang('kitlogo').'"><img src="'.DOKU_URL.'/lib/tpl/dokukit/images/logo_'.$conf['lang'].'_163.jpg" alt="'.tpl_getLang('kitlogo').'"></a>
</div>
<div id="head-image" >
<div id="head-text" class="big_font">';
$title = $conf['title'];
$short_institute = tpl_getConf('shortnstitute');
if ($short_institute) {
$title .= ' ('.$short_institute.')';
}
tpl_link(wl(), $title, 'name="dokuwiki__top" id="dokuwiki__top" accesskey="h" title="[ALT+H]"');
echo '
</div>
<div id="head-text-corner"> </div>
</div>
</div>
<div id="toggle_space" class="spacer">
<span style="display:none;" class="big_font"> show/hide Menu </a>
</div>
';
// send output to browser
tpl_flush();
// print content with sidebars on most locations
if(
$ACT != 'diff' &&
$ACT != 'edit' &&
$ACT != 'preview' &&
$ACT != 'admin' &&
$ACT != 'login' &&
$ACT != 'logout' &&
$ACT != 'profile' &&
$ACT != 'revisions'
&& $ACT != 'media'
) {
echo '
<div id="container">
<div id="left-row">
<div id="menu-box">';
if(tpl_getConf('showsearch')) {
echo '<div id="suchen">';
tpl_searchform();
echo '</div>';
}
_tpl_sidebar();
echo '</div></div>';
_tpl_infobox();
if($_SERVER['REMOTE_USER']){
echo '<div class="site_tools">';
tpl_button('subscribe');
tpl_button('history');
tpl_button('revert');
if($ACT != 'login' && $ACT != 'logout'){
tpl_button('media');
tpl_button('edit');
}
echo '</div>';
}
echo '
<div id="middle-row">
<div id="content">';
tpl_content();
// print content without sidebars
} else {
echo '
<div id="container" style="background-color: #fff;">
<div id="middle-row" style="margin-left:0; width: 960px;float:none;">
<div id="content">';
tpl_content();
}
echo '</div></div>';
tpl_flush();
echo '
<div class="clear"><!-- --></div>
<div id="footer-container">
<div class="spacer"><!-- --></div>
<div id="footer">
<div id="footer-corner"><!-- --></div>
<div id="footer-text">
<div id="footer-content">
<a href="#top" class="footer-right"><img src="'.DOKU_URL.'/lib/tpl/dokukit/images/totop.png" style="margin-top:6px" title="Nach oben" /></a>
</div>
</div>
</div>
<div id="owner">
<span id="owner-text" style="float:right; margin-right:31px">';
if($ACT != 'diff' && $ACT != 'edit' && $ACT != 'preview' && $ACT != 'admin' && $ACT != 'login' && $ACT != 'logout' && $ACT != 'profile' && $ACT != 'revisions') _tpl_pageinfo();
echo '
</span>
<span id="owner-text">'.tpl_getLang('kitfooter').'</span>
</div>';
/* provide DokuWiki housekeeping, required in all templates */
if($_SERVER['REMOTE_USER']) tpl_indexerWebBug();
echo '
</div>
</div>
</div>
</body>
</html>';
?>