source: trunk/web/punbb/footer.php @ 2

Last change on this file since 2 was 1, checked in by dj3c1t, 13 years ago

import initial

File size: 6.3 KB
RevLine 
[1]1<?php
2/***********************************************************************
3
4  Copyright (C) 2002-2005  Rickard Andersson (rickard@punbb.org)
5
6  This file is part of PunBB.
7
8  PunBB is free software; you can redistribute it and/or modify it
9  under the terms of the GNU General Public License as published
10  by the Free Software Foundation; either version 2 of the License,
11  or (at your option) any later version.
12
13  PunBB is distributed in the hope that it will be useful, but
14  WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  GNU General Public License for more details.
17
18  You should have received a copy of the GNU General Public License
19  along with this program; if not, write to the Free Software
20  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
21  MA  02111-1307  USA
22
23************************************************************************/
24
25/* décommenter pour activer les stats phpmyvisites */
26
27// include ("../phpmv2.php");
28
29
30
31
32/* décommenter pour activer les stats google analytics */
33
34// include ("../google_analytics.php");
35
36
37
38// Make sure no one attempts to run this script "directly"
39if (!defined('PUN'))
40        exit;
41
42$tpl_temp = trim(ob_get_contents());
43$tpl_main = str_replace('<pun_main>', $tpl_temp, $tpl_main);
44ob_end_clean();
45// END SUBST - <pun_main>
46
47
48// START SUBST - <pun_footer>
49ob_start();
50
51?>
52<div id="brdfooter" class="block">
53        <h2><span><?php echo $lang_common['Board footer'] ?></span></h2>
54        <div class="box">
55                <div class="inbox">
56<?php
57
58// If no footer style has been specified, we use the default (only copyright/debug info)
59$footer_style = isset($footer_style) ? $footer_style : NULL;
60
61if ($footer_style == 'index' || $footer_style == 'search')
62{
63        if (!$pun_user['is_guest'])
64        {
65                echo "\n\t\t\t".'<dl id="searchlinks" class="conl">'."\n\t\t\t\t".'<dt><strong>'.$lang_common['Search links'].'</strong></dt>'."\n\t\t\t\t".'<dd><a href="search.php?action=show_24h">'.$lang_common['Show recent posts'].'</a></dd>'."\n";
66                echo "\t\t\t\t".'<dd><a href="search.php?action=show_unanswered">'.$lang_common['Show unanswered posts'].'</a></dd>'."\n";
67
68                if ($pun_config['o_subscriptions'] == '1')
69                        echo "\t\t\t\t".'<dd><a href="search.php?action=show_subscriptions">'.$lang_common['Show subscriptions'].'</a></dd>'."\n";
70
71                echo "\t\t\t\t".'<dd><a href="search.php?action=show_user&amp;user_id='.$pun_user['id'].'">'.$lang_common['Show your posts'].'</a></dd>'."\n\t\t\t".'</dl>'."\n";
72        }
73        else
74        {
75                if ($pun_user['g_search'] == '1')
76                {
77                        echo "\n\t\t\t".'<dl id="searchlinks" class="conl">'."\n\t\t\t\t".'<dt><strong>'.$lang_common['Search links'].'</strong></dt><dd><a href="search.php?action=show_24h">'.$lang_common['Show recent posts'].'</a></dd>'."\n";
78                        echo "\t\t\t\t".'<dd><a href="search.php?action=show_unanswered">'.$lang_common['Show unanswered posts'].'</a></dd>'."\n\t\t\t".'</dl>'."\n";
79                }
80        }
81}
82else if ($footer_style == 'viewforum' || $footer_style == 'viewtopic')
83{
84        echo "\n\t\t\t".'<div class="conl">'."\n";
85
86        // Display the "Jump to" drop list
87        if ($pun_config['o_quickjump'] == '1')
88        {
89                // Load cached quickjump
90                @include PUN_ROOT.'cache/cache_quickjump_'.$pun_user['g_id'].'.php';
91                if (!defined('PUN_QJ_LOADED'))
92                {
93                        require_once PUN_ROOT.'include/cache.php';
94                        generate_quickjump_cache($pun_user['g_id']);
95                        require PUN_ROOT.'cache/cache_quickjump_'.$pun_user['g_id'].'.php';
96                }
97        }
98
99        if ($footer_style == 'viewforum' && $is_admmod)
100                echo "\t\t\t".'<p id="modcontrols"><a href="moderate.php?fid='.$forum_id.'&amp;p='.$p.'">'.$lang_common['Moderate forum'].'</a></p>'."\n";
101        else if ($footer_style == 'viewtopic' && $is_admmod)
102        {
103                echo "\t\t\t".'<dl id="modcontrols"><dt><strong>'.$lang_topic['Mod controls'].'</strong></dt><dd><a href="moderate.php?fid='.$forum_id.'&amp;tid='.$id.'&amp;p='.$p.'">'.$lang_common['Delete posts'].'</a></dd>'."\n";
104                echo "\t\t\t".'<dd><a href="moderate.php?fid='.$forum_id.'&amp;move_topics='.$id.'">'.$lang_common['Move topic'].'</a></dd>'."\n";
105
106                if ($cur_topic['closed'] == '1')
107                        echo "\t\t\t".'<dd><a href="moderate.php?fid='.$forum_id.'&amp;open='.$id.'">'.$lang_common['Open topic'].'</a></dd>'."\n";
108                else
109                        echo "\t\t\t".'<dd><a href="moderate.php?fid='.$forum_id.'&amp;close='.$id.'">'.$lang_common['Close topic'].'</a></dd>'."\n";
110
111                if ($cur_topic['sticky'] == '1')
112                        echo "\t\t\t".'<dd><a href="moderate.php?fid='.$forum_id.'&amp;unstick='.$id.'">'.$lang_common['Unstick topic'].'</a></dd></dl>'."\n";
113                else
114                        echo "\t\t\t".'<dd><a href="moderate.php?fid='.$forum_id.'&amp;stick='.$id.'">'.$lang_common['Stick topic'].'</a></dd></dl>'."\n";
115        }
116
117        echo "\t\t\t".'</div>'."\n";
118}
119
120?>
121                  <p class="conr">Propulsé par <a href="http://www.punbb.org/">PunBB</a><?php if ($pun_config['o_show_version'] == '1') echo ' '.$pun_config['o_cur_version']; ?><br />&copy; Copyright 2002&#8211;2005 Rickard Andersson<br /> Traduction par <a href="http://www.punbb.fr/">punbb.fr</a></p>
122<?php
123
124// Display debug info (if enabled/defined)
125if (defined('PUN_DEBUG'))
126{
127        // Calculate script generation time
128        list($usec, $sec) = explode(' ', microtime());
129        $time_diff = sprintf('%.3f', ((float)$usec + (float)$sec) - $pun_start);
130        echo "\t\t\t".'<p class="conr">[ Générée en '.$time_diff.' sec., '.$db->get_num_queries().' requêtes exécutées ]</p>'."\n";
131}
132
133?>
134                        <div class="clearer"></div>
135                </div>
136        </div>
137</div>
138<?php
139
140
141// End the transaction
142$db->end_transaction();
143
144// Display executed queries (if enabled)
145if (defined('PUN_SHOW_QUERIES'))
146        display_saved_queries();
147
148$tpl_temp = trim(ob_get_contents());
149$tpl_main = str_replace('<pun_footer>', $tpl_temp, $tpl_main);
150ob_end_clean();
151// END SUBST - <pun_footer>
152
153
154// START SUBST - <pun_include "*">
155while (preg_match('#<pun_include "([^/\\\\]*?)">#', $tpl_main, $cur_include))
156{
157        if (!file_exists(PUN_ROOT.'include/user/'.$cur_include[1]))
158            error('Impossible de procéder à l\'inclusion utilisateur &lt;pun_include "'.htmlspecialchars($cur_include[1]).'"&gt; depuis le template main.tpl. Il n\'y a pas de fichier dans le répertoire /include/user/');
159       
160        ob_start();
161        include PUN_ROOT.'include/user/'.$cur_include[1];
162        $tpl_temp = ob_get_contents();
163        $tpl_main = str_replace($cur_include[0], $tpl_temp, $tpl_main);
164    ob_end_clean();
165}
166// END SUBST - <pun_include "*">
167
168
169// Close the db connection (and free up any result data)
170// $db->close();
171
172// Spit out the page
173//exit($tpl_main);
174
175 require "pun_integration.php";
176
177?>
Note: See TracBrowser for help on using the repository browser.