source: branches/rsr.v5.1.dev/web/punbb/footer.php @ 3

Last change on this file since 3 was 3, checked in by dj3c1t, 12 years ago

passage a Fluxbb 1.4.7

File size: 5.7 KB
Line 
1<?php
2
3/**
4 * Copyright (C) 2008-2011 FluxBB
5 * based on code by Rickard Andersson copyright (C) 2002-2008 PunBB
6 * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher
7 */
8
9// Make sure no one attempts to run this script "directly"
10if (!defined('PUN'))
11        exit;
12
13$tpl_temp = trim(ob_get_contents());
14$tpl_main = str_replace('<pun_main>', $tpl_temp, $tpl_main);
15ob_end_clean();
16// END SUBST - <pun_main>
17
18
19// START SUBST - <pun_footer>
20ob_start();
21
22?>
23<div id="brdfooter" class="block">
24        <h2><span><?php echo $lang_common['Board footer'] ?></span></h2>
25        <div class="box">
26<?php
27
28if (isset($footer_style) && ($footer_style == 'viewforum' || $footer_style == 'viewtopic') && $is_admmod)
29{
30        echo "\t\t".'<div id="modcontrols" class="inbox">'."\n";
31
32        if ($footer_style == 'viewforum')
33        {
34                echo "\t\t\t".'<dl>'."\n";
35                echo "\t\t\t\t".'<dt><strong>'.$lang_forum['Mod controls'].'</strong></dt>'."\n";
36                echo "\t\t\t\t".'<dd><span><a href="moderate.php?fid='.$forum_id.'&amp;p='.$p.'">'.$lang_common['Moderate forum'].'</a></span></dd>'."\n";
37                echo "\t\t\t".'</dl>'."\n";
38        }
39        else if ($footer_style == 'viewtopic')
40        {
41                echo "\t\t\t".'<dl>'."\n";
42                echo "\t\t\t\t".'<dt><strong>'.$lang_topic['Mod controls'].'</strong></dt>'."\n";
43                echo "\t\t\t\t".'<dd><span><a href="moderate.php?fid='.$forum_id.'&amp;tid='.$id.'&amp;p='.$p.'">'.$lang_common['Moderate topic'].'</a></span></dd>'."\n";
44                echo "\t\t\t\t".'<dd><span><a href="moderate.php?fid='.$forum_id.'&amp;move_topics='.$id.'">'.$lang_common['Move topic'].'</a></span></dd>'."\n";
45
46                if ($cur_topic['closed'] == '1')
47                        echo "\t\t\t\t".'<dd><span><a href="moderate.php?fid='.$forum_id.'&amp;open='.$id.'">'.$lang_common['Open topic'].'</a></span></dd>'."\n";
48                else
49                        echo "\t\t\t\t".'<dd><span><a href="moderate.php?fid='.$forum_id.'&amp;close='.$id.'">'.$lang_common['Close topic'].'</a></span></dd>'."\n";
50
51                if ($cur_topic['sticky'] == '1')
52                        echo "\t\t\t\t".'<dd><span><a href="moderate.php?fid='.$forum_id.'&amp;unstick='.$id.'">'.$lang_common['Unstick topic'].'</a></span></dd>'."\n";
53                else
54                        echo "\t\t\t\t".'<dd><span><a href="moderate.php?fid='.$forum_id.'&amp;stick='.$id.'">'.$lang_common['Stick topic'].'</a></span></dd>'."\n";
55
56                echo "\t\t\t".'</dl>'."\n";
57        }
58
59        echo "\t\t\t".'<div class="clearer"></div>'."\n\t\t".'</div>'."\n";
60}
61
62?>
63                <div id="brdfooternav" class="inbox">
64<?php
65
66echo "\t\t\t".'<div class="conl">'."\n";
67
68// Display the "Jump to" drop list
69if ($pun_config['o_quickjump'] == '1')
70{
71        // Load cached quick jump
72        if (file_exists(FORUM_CACHE_DIR.'cache_quickjump_'.$pun_user['g_id'].'.php'))
73                include FORUM_CACHE_DIR.'cache_quickjump_'.$pun_user['g_id'].'.php';
74
75        if (!defined('PUN_QJ_LOADED'))
76        {
77                if (!defined('FORUM_CACHE_FUNCTIONS_LOADED'))
78                        require PUN_ROOT.'include/cache.php';
79
80                generate_quickjump_cache($pun_user['g_id']);
81                require FORUM_CACHE_DIR.'cache_quickjump_'.$pun_user['g_id'].'.php';
82        }
83}
84
85echo "\t\t\t".'</div>'."\n";
86
87?>
88                        <div class="conr">
89<?php
90
91// If no footer style has been specified, we use the default (only copyright/debug info)
92$footer_style = isset($footer_style) ? $footer_style : NULL;
93
94if ($footer_style == 'index')
95{
96        if ($pun_config['o_feed_type'] == '1')
97                echo "\t\t\t\t".'<p id="feedlinks"><span class="rss"><a href="extern.php?action=feed&amp;type=rss">'.$lang_common['RSS active topics feed'].'</a></span></p>'."\n";
98        else if ($pun_config['o_feed_type'] == '2')
99                echo "\t\t\t\t".'<p id="feedlinks"><span class="atom"><a href="extern.php?action=feed&amp;type=atom">'.$lang_common['Atom active topics feed'].'</a></span></p>'."\n";
100}
101else if ($footer_style == 'viewforum')
102{
103        if ($pun_config['o_feed_type'] == '1')
104                echo "\t\t\t\t".'<p id="feedlinks"><span class="rss"><a href="extern.php?action=feed&amp;fid='.$forum_id.'&amp;type=rss">'.$lang_common['RSS forum feed'].'</a></span></p>'."\n";
105        else if ($pun_config['o_feed_type'] == '2')
106                echo "\t\t\t\t".'<p id="feedlinks"><span class="atom"><a href="extern.php?action=feed&amp;fid='.$forum_id.'&amp;type=atom">'.$lang_common['Atom forum feed'].'</a></span></p>'."\n";
107}
108else if ($footer_style == 'viewtopic')
109{
110        if ($pun_config['o_feed_type'] == '1')
111                echo "\t\t\t\t".'<p id="feedlinks"><span class="rss"><a href="extern.php?action=feed&amp;tid='.$id.'&amp;type=rss">'.$lang_common['RSS topic feed'].'</a></span></p>'."\n";
112        else if ($pun_config['o_feed_type'] == '2')
113                echo "\t\t\t\t".'<p id="feedlinks"><span class="atom"><a href="extern.php?action=feed&amp;tid='.$id.'&amp;type=atom">'.$lang_common['Atom topic feed'].'</a></span></p>'."\n";
114}
115
116?>
117                                <p id="poweredby"><?php printf($lang_common['Powered by'], '<a href="http://fluxbb.org/">FluxBB</a>'.(($pun_config['o_show_version'] == '1') ? ' '.$pun_config['o_cur_version'] : '')) ?></p>
118                        </div>
119                        <div class="clearer"></div>
120                </div>
121        </div>
122</div>
123<?php
124
125// Display debug info (if enabled/defined)
126if (defined('PUN_DEBUG'))
127{
128        echo '<p id="debugtime">[ ';
129
130        // Calculate script generation time
131        $time_diff = sprintf('%.3f', get_microtime() - $pun_start);
132        echo sprintf($lang_common['Querytime'], $time_diff, $db->get_num_queries());
133
134        if (function_exists('memory_get_usage'))
135        {
136                echo ' - '.sprintf($lang_common['Memory usage'], file_size(memory_get_usage()));
137
138                if (function_exists('memory_get_peak_usage'))
139                        echo ' '.sprintf($lang_common['Peak usage'], file_size(memory_get_peak_usage()));
140        }
141
142        echo ' ]</p>'."\n";
143}
144
145
146// End the transaction
147$db->end_transaction();
148
149// Display executed queries (if enabled)
150if (defined('PUN_SHOW_QUERIES'))
151        display_saved_queries();
152
153$tpl_temp = trim(ob_get_contents());
154$tpl_main = str_replace('<pun_footer>', $tpl_temp, $tpl_main);
155ob_end_clean();
156// END SUBST - <pun_footer>
157
158
159// Close the db connection (and free up any result data)
160//$db->close();
161
162// Spit out the page
163//exit($tpl_main);
164
165 require "pun_integration.php";
166
167?>
Note: See TracBrowser for help on using the repository browser.