author | Dan |
Sun, 15 Jun 2008 01:42:31 -0400 | |
changeset 9 | a932ce8c4827 |
parent 7 | 98bbc533541c |
permissions | -rw-r--r-- |
7
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1 |
<?php |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
2 |
/*********************************************************************** |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
3 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
4 |
Copyright (C) 2002-2008 PunBB.org |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
5 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
6 |
This file is part of PunBB. |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
7 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
8 |
PunBB is free software; you can redistribute it and/or modify it |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
9 |
under the terms of the GNU General Public License as published |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
10 |
by the Free Software Foundation; either version 2 of the License, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
11 |
or (at your option) any later version. |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
12 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
13 |
PunBB is distributed in the hope that it will be useful, but |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
14 |
WITHOUT ANY WARRANTY; without even the implied warranty of |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
15 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
16 |
GNU General Public License for more details. |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
17 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
18 |
You should have received a copy of the GNU General Public License |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
19 |
along with this program; if not, write to the Free Software |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
20 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
21 |
MA 02111-1307 USA |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
22 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
23 |
************************************************************************/ |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
24 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
25 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
26 |
// Make sure no one attempts to run this script "directly" |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
27 |
if (!defined('PUN')) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
28 |
exit; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
29 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
30 |
// Send no-cache headers |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
31 |
header('Expires: Thu, 21 Jul 1977 07:30:00 GMT'); // When yours truly first set eyes on this world! :) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
32 |
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
33 |
header('Cache-Control: post-check=0, pre-check=0', false); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
34 |
header('Pragma: no-cache'); // For HTTP/1.0 compability |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
35 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
36 |
// Send the Content-type header in case the web server is setup to send something else |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
37 |
header('Content-type: text/html; charset=utf-8'); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
38 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
39 |
// Load the main template |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
40 |
if (substr(PUN_PAGE, 0, 5) == 'admin') |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
41 |
{ |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
42 |
if (file_exists(PUN_ROOT.'style/'.$pun_user['style'].'/admin.tpl')) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
43 |
$tpl_main = file_get_contents(PUN_ROOT.'style/'.$pun_user['style'].'/admin.tpl'); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
44 |
else |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
45 |
$tpl_main = file_get_contents(PUN_ROOT.'include/template/admin.tpl'); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
46 |
} |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
47 |
else if (PUN_PAGE == 'help') |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
48 |
$tpl_main = file_get_contents(PUN_ROOT.'include/template/help.tpl'); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
49 |
else |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
50 |
{ |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
51 |
if (file_exists(PUN_ROOT.'style/'.$pun_user['style'].'/main.tpl')) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
52 |
$tpl_main = file_get_contents(PUN_ROOT.'style/'.$pun_user['style'].'/main.tpl'); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
53 |
else |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
54 |
$tpl_main = file_get_contents(PUN_ROOT.'include/template/main.tpl'); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
55 |
} |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
56 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
57 |
($hook = get_hook('hd_template_loaded')) ? eval($hook) : null; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
58 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
59 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
60 |
// START SUBST - <!-- pun_local --> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
61 |
$tpl_main = str_replace('<!-- pun_local -->', 'xml:lang="'.$lang_common['lang_identifier'].'" lang="'.$lang_common['lang_identifier'].'" dir="'.$lang_common['lang_direction'].'"', $tpl_main); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
62 |
// END SUBST - <!-- pun_local --> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
63 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
64 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
65 |
// START SUBST - <!-- pun_head --> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
66 |
ob_start(); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
67 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
68 |
// Is this a page that we want search index spiders to index? |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
69 |
if (!defined('PUN_ALLOW_INDEX')) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
70 |
echo '<meta name="ROBOTS" content="NOINDEX, FOLLOW" />'."\n"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
71 |
else |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
72 |
echo '<meta name="description" content="'.generate_crumbs(true).'" />'."\n"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
73 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
74 |
// Should we output a MicroID? http://microid.org/ |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
75 |
if (strpos(PUN_PAGE, 'profile') === 0) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
76 |
echo '<meta name="microid" content="mailto+http:sha1:'.sha1(sha1('mailto:'.$user['email']).sha1(pun_link($pun_url['user'], $id))).'" />'."\n"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
77 |
|
9 | 78 |
// Generate the page title (really hackish Enano specific trick) |
79 |
$enano_template =& $GLOBALS['template']; |
|
80 |
$enano_template->tpl_strings['PAGE_NAME'] = generate_crumbs(true); |
|
7
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
81 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
82 |
// Should we output feed links? |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
83 |
if (PUN_PAGE == 'viewtopic') |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
84 |
{ |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
85 |
echo '<link rel="alternate" type="application/rss+xml" href="'.pun_link($pun_url['topic_rss'], $id).'" title="'.$lang_common['RSS Feed'].'" />'."\n"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
86 |
echo '<link rel="alternate" type="application/atom+xml" href="'.pun_link($pun_url['topic_atom'], $id).'" title="'.$lang_common['ATOM Feed'].'" />'."\n"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
87 |
} |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
88 |
else if (PUN_PAGE == 'viewforum') |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
89 |
{ |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
90 |
echo '<link rel="alternate" type="application/rss+xml" href="'.pun_link($pun_url['forum_rss'], $id).'" title="RSS" />'."\n"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
91 |
echo '<link rel="alternate" type="application/atom+xml" href="'.pun_link($pun_url['forum_atom'], $id).'" title="ATOM" />'."\n"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
92 |
} |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
93 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
94 |
?> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
95 |
<link rel="top" href="<?php echo $base_url ?>" title="<?php echo $lang_common['Forum index'] ?>" /> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
96 |
<?php |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
97 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
98 |
// If there are more than two breadcrumbs, add the "up" link (second last) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
99 |
if (count($pun_page['crumbs']) > 2) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
100 |
echo '<link rel="up" href="'.$pun_page['crumbs'][count($pun_page['crumbs']) - 2][1].'" title="'.htmlspecialchars($pun_page['crumbs'][count($pun_page['crumbs']) - 2][0]).'" />'."\n"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
101 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
102 |
// If there are other page navigation links (first, next, prev and last) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
103 |
if (!empty($pun_page['nav'])) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
104 |
echo implode("\n", $pun_page['nav'])."\n"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
105 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
106 |
?> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
107 |
<link rel="search" href="<?php echo pun_link($pun_url['search']) ?>" title="<?php echo $lang_common['Search'] ?>" /> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
108 |
<link rel="author" href="<?php echo pun_link($pun_url['users']) ?>" title="<?php echo $lang_common['User list'] ?>" /> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
109 |
<?php |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
110 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
111 |
// Include stylesheets |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
112 |
require PUN_ROOT.'style/'.$pun_user['style'].'/'.$pun_user['style'].'.php'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
113 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
114 |
?> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
115 |
<script type="text/javascript" src="<?php echo $base_url ?>/include/js/common.js"></script> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
116 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
117 |
<!-- ugly style override for oxygen --> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
118 |
<style type="text/css"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
119 |
div.pun-page ul li { |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
120 |
list-style-image: none !important; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
121 |
list-style-type: none !important; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
122 |
} |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
123 |
div.pun-page h2 { |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
124 |
border-bottom-width: 0 !important; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
125 |
} |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
126 |
</style> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
127 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
128 |
<?php |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
129 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
130 |
($hook = get_hook('hd_'.PUN_PAGE.'_head')) ? eval($hook) : null; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
131 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
132 |
($hook = get_hook('hd_head')) ? eval($hook) : null; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
133 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
134 |
$tpl_temp = trim(ob_get_contents()); |
9 | 135 |
|
7
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
136 |
$template->add_header($tpl_temp); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
137 |
ob_end_clean(); |
9 | 138 |
|
7
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
139 |
// END SUBST - <!-- pun_head --> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
140 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
141 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
142 |
// START SUBST - <!-- pun_page --> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
143 |
$tpl_main = str_replace('<!-- pun_page -->', 'id="pun-'.PUN_PAGE.'"', $tpl_main); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
144 |
// END SUBST - <!-- pun_page --> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
145 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
146 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
147 |
// START SUBST - <!-- pun_skip --> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
148 |
$tpl_main = str_replace('<!-- pun_skip -->', '<div id="pun-access"><a href="#pun-main">'.$lang_common['Skip to content'].'</a></div>'."\n", $tpl_main); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
149 |
// END SUBST - <!-- pun_skip --> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
150 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
151 |
// START SUBST - <!-- pun_title --> |
9 | 152 |
$tpl_main = str_replace('<!-- pun_title -->', '', $tpl_main); // '<div id="pun-title">'."\n\t".'<div><strong>'.htmlspecialchars($pun_config['o_board_title']).'</strong></div>'."\n".'</div>'."\n", $tpl_main); |
7
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
153 |
// END SUBST - <!-- pun_title --> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
154 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
155 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
156 |
// START SUBST - <!-- pun_desc --> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
157 |
if ($pun_config['o_board_desc'] != '') |
9 | 158 |
$tpl_main = str_replace('<!-- pun_desc -->', '', $tpl_main); // '<div id="pun-desc">'."\n\t".'<div>'.htmlspecialchars($pun_config['o_board_desc']).'</div>'."\n".'</div>'."\n", $tpl_main); |
7
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
159 |
// END SUBST - <!-- pun_desc --> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
160 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
161 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
162 |
// START SUBST - <!-- pun_navlinks --> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
163 |
$tpl_main = str_replace('<!-- pun_navlinks -->', '<div id="pun-navlinks">'."\n\t".'<ul>'."\n\t\t".generate_navlinks()."\n\t".'</ul>'."\n".'</div>'."\n", $tpl_main); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
164 |
// END SUBST - <!-- pun_navlinks --> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
165 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
166 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
167 |
// START SUBST - <!-- pun_crumbs --> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
168 |
$tpl_main = str_replace('<!-- pun_crumbs -->', '<div id="pun-crumbs-head">'."\n\t".'<p class="crumbs">'.generate_crumbs(false).'</p>'."\n".'</div>'."\n", $tpl_main); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
169 |
// END SUBST - <!-- pun_crumbs --> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
170 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
171 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
172 |
// START SUBST - <!-- pun_visit --> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
173 |
ob_start(); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
174 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
175 |
if ($pun_user['is_guest']) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
176 |
{ |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
177 |
$visit_msg = array( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
178 |
'<span id="vs-logged">'.$lang_common['Not logged in'].'</span>', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
179 |
'<span id="vs-message">'.$lang_common['Login nag'].'</span>' |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
180 |
); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
181 |
} |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
182 |
else |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
183 |
{ |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
184 |
$visit_msg = array( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
185 |
'<span id="vs-logged">'.sprintf($lang_common['Logged in as'], '<strong>'.htmlspecialchars($pun_user['username']).'</strong>').'</span>', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
186 |
'<span id="vs-message">'.sprintf($lang_common['Last visit'], '<strong>'.format_time($pun_user['last_visit']).'</strong>').'</span>' |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
187 |
); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
188 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
189 |
$visit_links = array( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
190 |
'<li id="vs-searchnew"><a href="'.pun_link($pun_url['search_new']).'" title="'.$lang_common['New posts info'].'">'.$lang_common['New posts'].'</a></li>', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
191 |
'<li id="vs-markread"><a href="'.pun_link($pun_url['mark_read']).'">'.$lang_common['Mark all as read'].'</a></li>' |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
192 |
); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
193 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
194 |
if ($pun_user['is_admmod']) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
195 |
{ |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
196 |
$query = array( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
197 |
'SELECT' => 'COUNT(r.id)', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
198 |
'FROM' => 'reports AS r', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
199 |
'WHERE' => 'r.zapped IS NULL', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
200 |
); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
201 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
202 |
($hook = get_hook('hd_qr_get_unread_reports_count')) ? eval($hook) : null; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
203 |
$result_header = $pun_db->query_build($query) or error(__FILE__, __LINE__); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
204 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
205 |
if ($pun_db->result($result_header)) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
206 |
$visit_links[] = '<li id="vs-reports"><a href="'.pun_link($pun_url['admin_reports']).'"><strong>'.$lang_common['New reports'].'</strong></a></li>'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
207 |
} |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
208 |
} |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
209 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
210 |
($hook = get_hook('hd_visit')) ? eval($hook) : null; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
211 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
212 |
?> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
213 |
<div id="pun-visit"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
214 |
<?php if (!$pun_user['is_guest']): ?> <ul> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
215 |
<?php echo implode("\n\t\t", $visit_links)."\n" ?> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
216 |
</ul> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
217 |
<?php endif; ?> <p> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
218 |
<?php echo implode("\n\t\t", $visit_msg)."\n" ?> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
219 |
</p> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
220 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
221 |
<?php |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
222 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
223 |
$tpl_temp = ob_get_contents(); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
224 |
$tpl_main = str_replace('<!-- pun_visit -->', $tpl_temp, $tpl_main); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
225 |
ob_end_clean(); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
226 |
// END SUBST - <!-- pun_visit --> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
227 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
228 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
229 |
// START SUBST - <!-- pun_alert --> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
230 |
$alert_items = array(); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
231 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
232 |
if ($pun_config['o_maintenance'] == '1' && $session->user_level >= USER_LEVEL_ADMIN) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
233 |
$alert_items[] = '<p id="maint-alert"'.(empty($alert_items) ? ' class="first-alert"' : '').'><strong>'.$lang_common['Maintenance mode'].'</strong> <span>'.$lang_common['Maintenance alert'].'</span></p>'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
234 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
235 |
if ($session->user_level >= USER_LEVEL_ADMIN && $pun_config['o_check_for_updates'] == '1') |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
236 |
{ |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
237 |
if ($pun_updates['fail']) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
238 |
$alert_items[] = '<p id="updates-alert"'.(empty($alert_items) ? ' class="first-alert"' : '').'><strong>'.$lang_common['Updates'].'</strong> <span>'.$lang_common['Updates failed'].'</span></p>'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
239 |
else if (isset($pun_updates['version']) && isset($pun_updates['hotfix'])) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
240 |
$alert_items[] = '<p id="updates-alert"'.(empty($alert_items) ? ' class="first-alert"' : '').'><strong>'.$lang_common['Updates'].'</strong> <span>'.sprintf($lang_common['Updates version n hf'], $pun_updates['version']).'</span></p>'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
241 |
else if (isset($pun_updates['version'])) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
242 |
$alert_items[] = '<p id="updates-alert"'.(empty($alert_items) ? ' class="first-alert"' : '').'><strong>'.$lang_common['Updates'].'</strong> <span>'.sprintf($lang_common['Updates version'], $pun_updates['version']).'</span></p>'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
243 |
else if (isset($pun_updates['hotfix'])) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
244 |
$alert_items[] = '<p id="updates-alert"'.(empty($alert_items) ? ' class="first-alert"' : '').'><strong>'.$lang_common['Updates'].'</strong> <span>'.$lang_common['Updates hf'].'</span></p>'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
245 |
} |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
246 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
247 |
($hook = get_hook('hd_alert')) ? eval($hook) : null; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
248 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
249 |
if (!empty($alert_items)) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
250 |
{ |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
251 |
ob_start(); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
252 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
253 |
?> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
254 |
<div id="pun-alert"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
255 |
<h1 class="warn"><strong><?php echo $lang_common['Attention'] ?></strong></h1> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
256 |
<div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
257 |
<?php echo implode("\n\t\t", $alert_items)."\n" ?> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
258 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
259 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
260 |
<?php |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
261 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
262 |
$tpl_temp = ob_get_contents(); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
263 |
$tpl_main = str_replace('<!-- pun_alert -->', $tpl_temp, $tpl_main); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
264 |
ob_end_clean(); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
265 |
} |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
266 |
// END SUBST - <!-- pun_alert --> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
267 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
268 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
269 |
// START SUBST - <!-- pun_announcement --> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
270 |
if ($pun_config['o_announcement'] == '1') |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
271 |
$tpl_main = str_replace('<!-- pun_announcement -->', '<div id="pun-announcement">'."\n\t".'<div class="userbox">'.($pun_config['o_announcement_heading'] != '' ? "\n\t\t".'<h2 class="msg-head">'.$pun_config['o_announcement_heading'].'</h2>' : '')."\n\t\t".$pun_config['o_announcement_message']."\n\t".'</div>'."\n".'</div>'."\n", $tpl_main); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
272 |
// END SUBST - <!-- pun_announcement --> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
273 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
274 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
275 |
// START SUBST - <!-- pun_main --> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
276 |
ob_start(); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
277 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
278 |
define('PUN_HEADER', 1); |