1<?php
2/**
3 * functions for mmKanso Template
4 *
5 * License: GPL 2 (http://www.gnu.org/licenses/gpl.html)
6 *
7 * @author:   Marcin Mierzejewski <marcin.mierzejewski@zenzire.com>
8 * @homepage: http://www.zenzire.com
9 *
10 * @contributor: Martin Koser <http://www.frogpond.de>
11 */
12
13require_once('conf.php');
14
15
16/**
17 * Displays the topbar
18 *
19 */
20function tpl_topbar()
21{
22    global $INFO,$ID,$lang,$REV;
23    $perm = $INFO['perm'];
24
25
26    tpl_actionlink('edit');
27    echo '&nbsp;&middot;&nbsp;';
28
29    tpl_actionlink('admin');
30    echo '&nbsp;&middot;&nbsp;';
31
32    tpl_userinfo();
33    echo '&nbsp;&middot;&nbsp;';
34
35    tpl_actionlink('login');
36}
37
38
39/**
40 * Displays the bottombar
41 *
42 */
43function tpl_bottombar()
44{
45    global $INFO,$ID,$lang,$REV;
46    $perm = $INFO['perm'];
47
48    tpl_actionlink('edit');
49    echo '&nbsp;&middot;&nbsp;';
50
51    tpl_actionlink('backlink');
52    echo '&nbsp;&middot;&nbsp;';
53
54    tpl_actionlink('history');
55    echo '&nbsp;&middot;&nbsp;';
56
57    tpl_actionlink('subscribe');
58    echo ' _ ';
59    tpl_actionlink('subscribens');
60    echo '&nbsp;&middot;&nbsp;';
61
62    tpl_actionlink('recent');
63    echo '&nbsp;&middot;&nbsp;';
64
65    tpl_actionlink('profile');
66}
67
68function tpl_renderMenu()
69{
70	global $INFO, $ID, $conf;
71
72	print '<div class="MenuContainer">';
73
74	print '<div class="Menu" id="level1">';
75	print p_wiki_xhtml("menu1", '', false);
76	print '</div>';
77
78	print '<div class="Menu" id="level2">';
79
80	if ( $conf['tpl_mmKanso']['menu2Permanent'] )
81	{
82		$path = "";
83	}
84	else
85	{
86		if ( false != strpos($ID, ":") )
87		{
88			$path = substr($ID, 0, strpos($ID, ":"));
89		}
90		else
91		{
92			$path = $ID;
93		}
94		$path .= ":";
95	}
96
97	print p_wiki_xhtml($path."menu2", '', false);
98	print '</div>';
99
100	if (  $INFO['perm'] > AUTH_READ )
101	{
102		print '<div style="clear: both;"></div>';
103		print '<div class="MenuContainer">';
104		print '<div class="Menu" id="level1">';
105		print '<ul><li><a href="?id=menu1&amp;do=edit" class="wikilink1" title="Edit Menu"><b>Edit Menu</b></a></li></ul>';
106		print '</div>';
107
108		print '<div class="Menu" id="level2">';
109		print '<ul><li><a href="?id='.$path.'menu2&amp;do=edit" class="wikilink1" title="Edit Menu"><b>Edit Menu</b></a></li></ul>';
110		print '</div>';
111
112		print '</div>';
113
114		print '</div>';
115	}
116}
117
118?>
119