/
main.php
149 lines (119 loc) · 4.46 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
<?php
/**
* Dokuwiki project:chorus Template
*
* @link http://wiki.splitbrain.org/wiki:tpl:templates
* @author Pieter E Sartain <pesartain@googlemail.com>
*/
// must be run from dw
if (!defined('DOKU_INC')) die();
// multitemplate capable
if (isset($DOKU_TPL)==FALSE) $DOKU_TPL = DOKU_TPL;
if (isset($DOKU_TPLINC)==FALSE) $DOKU_TPLINC = DOKU_TPLINC;
if (isset($CONF_TPL)==FALSE) $CONF_TPL = 'projectchorus';
// Handy function
function getRootNS($id){
$pos = strpos((string)$id,':');
if($pos!==false){
return substr((string)$id,0,$pos);
}
return false;
}
function checkNS($ns) {
// This tests for root NS or pagename
//if ( (getRootNS(getID()) == $ns) || (noNSorNS(getID()) == $ns ) ) {
// This version just tests the namespace, not a pagename.
if (getRootNS(getID()) == $ns) {
return true;
}
return false;
}
function getTitle() {
global $ID;
return p_get_first_heading($ID);
}
function getSongID() {
global $ID;
$arr = explode(':',$ID);
return $arr[1];
}
?>
<!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>project:chorus ~ <?php tpl_pagetitle()?></title>
<?php tpl_metaheaders(false,$CONF_TPL)?>
<link rel="shortcut icon" href="<?php echo $DOKU_TPL?>images/favicon.ico" />
<!--
<link rel="alternate" type="application/rss+xml" title="pesartain.com/blog ~ The Last Word" href="/feed.php?ns=blog&num=10&linkto=current&content=html" />
-->
<?php /*old includehook*/ @include(dirname(__FILE__).'/meta.html')?>
</head>
<body>
<?php /*old includehook*/ @include(dirname(__FILE__).'/topheader.html')?>
<div class="dokuwiki">
<?php html_msgarea()?>
<div class="backdrop"><img src="<?php echo $DOKU_TPL?>images/gradient1024.jpg" id="background" /></div>
<div class="backdrop grunge"> </div>
<img src="<?php echo $DOKU_TPL?>images/cornerblack.png" alt="" id="cornerblack" />
<img src="<?php echo $DOKU_TPL?>images/cornerwhite.png" alt="" id="cornerwhite" />
<div id="content">
<div class="scrollarea">
<?php if (checkNS('songs')) {
$songid = getSongID();
echo '<ul id="nav"><li>';
tpl_pagelink(':songs:'.$songid,getTitle());
echo '</li><li>';
tpl_pagelink(':songs:'.$songid.':lyrics','Lyrics');
echo '</li><li>';
tpl_pagelink(':songs:'.$songid.':tab','Tab');
echo '</li><li>';
tpl_pagelink(':songs:'.$songid.':archive','Archive');
echo '</li></ul>';
} ?>
<div class="xt"> </div>
<div class="content">
<!-- wikipage start -->
<?php tpl_content()?>
<!-- wikipage stop -->
</div>
<div class="xb"> </div>
<div class="space"> </div>
</div>
</div>
<div id="pageicons" class="footerinc">
<?php
tpl_actionlink('edit','','','<img src="'.$DOKU_TPL.'images/icons/icon_edit.png" title="Edit" alt="Edit" class="icon"></img>');
tpl_actionlink('history','','','<img src="'.$DOKU_TPL.'images/icons/icon_revisions.png" title="Old revisions" alt="Old revisions" class="icon"></img>');
?>
</div>
<div id="menu">
<div class="menutitle">
<div>project:chorus</div>
</div>
<div class="menulist">
<ul><a href="/about"><div>about</div></a></ul>
<ul><a href="/songs"><div>songs</div></a></ul>
<ul><a href="/projects"><div>projects</div></a></ul>
<ul><a href="/license"><div>license</div></a></ul>
</div>
<div id="menucontent" class="menucontent"> </div>
<div class="menuright footerinc">
<?php
tpl_actionlink('index','','','<img src="'.$DOKU_TPL.'images/icons/icon_index.png" title="Index" alt="Index" class="icon"></img>');
tpl_actionlink('recent','','','<img src="'.$DOKU_TPL.'images/icons/icon_recent.png" title="Recent" alt="Recent" class="icon"></img>');
tpl_actionlink('admin','','','<img src="'.$DOKU_TPL.'images/icons/icon_admin.png" title="Admin" alt="Admin" class="icon"></img>');
tpl_actionlink('login','','','<img src="'.$DOKU_TPL.'images/icons/icon_login.png" title="Log In" alt="Log In" class="icon"></img>');
tpl_actionlink('profile','','','<img src="'.$DOKU_TPL.'images/icons/icon_profile.png" title="Profile" alt="Profile" class="icon"></img>');
?>
</div>
</div>
<a href="/">
<img src="<?php echo $DOKU_TPL?>images/projectchorus.png" alt="project:chorus" id="logo" />
</a>
</div>
</body>
</html>