This repository has been archived by the owner on Jan 5, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.php
202 lines (165 loc) · 6.15 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
<?php
/**
* DokuWiki Default 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.
*
* @link http://dokuwiki.org/templates
* @author Andreas Gohr <[email protected]>
*/
// must be run from within DokuWiki
if (!defined('DOKU_INC')) die();
?>
<!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 tpl_pagetitle()?>
[<?php echo strip_tags($conf['title'])?>]
</title>
<?php tpl_metaheaders()?>
<?php echo tpl_favicon(array('favicon', 'mobile')) ?>
<?php /*old includehook*/ @include(dirname(__FILE__).'/meta.html')?>
<!-- Google Analytics -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-35105820-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body>
<?php /*old includehook*/ @include(dirname(__FILE__).'/topheader.html')?>
<div class="dokuwiki">
<?php html_msgarea()?>
<div class="stylehead">
<div class="header">
<div id="wikiheader">
<ul class="links">
<li class="first"><a href="http://www.ubuntu.cz" title="Ubuntu.cz">Ubuntu.cz</a></li>
<li><a href="http://wiki.ubuntu.cz/" title="Wiki návody">Wiki návody</a></li>
<li><a href="http://forum.ubuntu.cz/" title="Fórum">Fórum</a></li>
<li><a href="http://blog.ubuntu.cz" title="">Blog</a></li>
<li class="last"><a href="http://komunita.ubuntu.cz" title="">Komunita</a></li>
<div class="min-search"><?php tpl_searchform();?></div>
<div id="logo"> <a href="http://wiki.ubuntu.cz" title=""> <img src="/lib/tpl/ubuntucz-wiki-theme/images/logo.png" alt=""></a></div>
</ul>
</div>
<div class="clearer"></div>
</div>
<?php /*old includehook*/ @include(dirname(__FILE__).'/header.html')?>
<div class="bar" id="bar__top">
<div class="bar-left" id="bar__topleft">
<?php tpl_button('edit')?>
<?php tpl_button('media')?>
<?php tpl_select_actions()?>
</div>
<div class="bar-right" id="bar__topright">
<span id="user"><?php if ($_SERVER['REMOTE_USER']) print '<a href="/users/'.$_SERVER['REMOTE_USER'].'">'.$INFO['userinfo']['name'].'</a>'?></span>
<?php tpl_button('profile')?>
<?php tpl_button('admin')?>
<?php tpl_button('login')?>
<?php tpl_button('recent')?>
</div>
<div class="clearer"></div>
</div>
<?php if($conf['breadcrumbs']){?>
<div class="breadcrumbs">
<?php tpl_breadcrumbs()?>
<?php //tpl_youarehere() //(some people prefer this)?>
</div>
<?php }?>
<?php if($conf['youarehere']){?>
<div class="breadcrumbs">
<?php tpl_youarehere() ?>
</div>
<?php }?>
</div>
<?php tpl_flush()?>
<?php /*old includehook*/ @include(dirname(__FILE__).'/pageheader.html')?>
<div class="page">
<!-- wikipage start -->
<?php tpl_content()?>
<!-- wikipage stop -->
</div>
<div class="clearer"></div>
<?php tpl_flush()?>
<div class="stylefoot">
<div class="meta">
<div class="user">
<?php tpl_userinfo()?>
</div>
<div class="doc">
<?php
if ($INFO['user']) {
global $auth;
$userinfo = $auth->getUserData($INFO['user']);
print 'Poslední úprava: '.dformat($INFO['lastmod']).', autor: <a href="/users/'.$INFO['user'].'">'.$userinfo['name'].'</a>';
}
else tpl_pageinfo(); ?>
</div>
</div>
<?php /*old includehook*/ @include(dirname(__FILE__).'/pagefooter.html')?>
<div class="bar" id="bar__bottom">
<div class="clearer"></div>
</div>
</div>
<div class="footerinc">
<div id="copy">Logo Ubuntu, Ubuntu a Canonical jsou registrované obchodní známky firmy Canonical Ltd.</div>
<div id="link"><a href="/Licence">Licence</a> | <a href="/Autoři">Autoři</a></div>
</div>
</div>
<?php /*old includehook*/ @include(dirname(__FILE__).'/footer.html')?>
<div class="no"><?php /* provide DokuWiki housekeeping, required in all templates */ tpl_indexerWebBug()?></div>
</body>
</html>
<?php /**
* Create actions select box
*
* Create actions select box.
*
* @author Kirill Bezrukov <[email protected]>
*/
function tpl_select_actions(){
global $ID;
global $INFO;
global $REV;
global $ACT;
global $conf;
global $lang;
global $auth;
if($ACT == 'show' || $ACT == 'search'){
if($INFO['writable']){
if($INFO['exists']){
print '<select class="edit" name="actionmenu" onchange=
"if ((this.selectedIndex != 0) &&
(this.options[this.selectedIndex].disabled == false)) {
location.href = this.options[this.selectedIndex].value;
}
this.selectedIndex = 0;" >'. DOKU_LF;
print ' <option value="show">Další akce:</option>'.DOKU_LF;
print ' <option value="'.wl($ID,'do=export_raw').'">Zdrojový kód</option>'. DOKU_LF;
print ' <option value="'.wl($ID,'do=export_xhtml').'">HTML export</option>'. DOKU_LF;
print ' <option value="show" disabled="disabled" class="disabled">--------------</option>'. DOKU_LF;
print ' <option value="'.wl($ID,'purge=true').'">Smazat cache</option>'. DOKU_LF;
print ' <option value="'.wl($ID,'do=admin&page=acl').'">ACL</option>'. DOKU_LF;
print ' <option value="show" disabled="disabled" class="disabled">--------------</option>'. DOKU_LF;
print ' <option value="'.wl($ID,'do=revisions').'">Starší verze</option>'. DOKU_LF;
print ' <option value="'.wl($ID,'do=subscribe').'">Odebírat změny</option>'. DOKU_LF;
print '</select>';
}
}
}
return true;
}?>