-
Notifications
You must be signed in to change notification settings - Fork 0
/
footer.php
148 lines (115 loc) · 5.96 KB
/
footer.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
/**
* Copyright (C) 2013-2014 ModernBB Group
* Based on code by FluxBB copyright (C) 2008-2012 FluxBB
* Based on code by Rickard Andersson copyright (C) 2002-2008 PunBB
* Licensed under GPLv3 (http://modernbb.be/license.php)
*/
// Make sure no one attempts to run this script "directly"
if (!defined('FORUM'))
exit;
$tpl_temp = trim(ob_get_contents());
$tpl_main = str_replace('<luna_main>', $tpl_temp, $tpl_main);
ob_end_clean();
// END SUBST - <luna_main>
// START SUBST - <luna_footer>
ob_start();
?>
<div class="container">
<footer>
<?php if (isset($footer_style) && ($footer_style == 'viewforum' || $footer_style == 'viewtopic') && $is_admmod) { ?>
<div class="modcontrols">
<?php if ($footer_style == 'viewforum') { ?>
<a href="moderate.php?fid=<?php echo $forum_id ?>&p=<?php echo $p ?>" class="btn btn-primary btn-sm"><span class="glyphicon glyphicon-eye-open"></span> <?php echo $lang['Moderate forum'] ?></a>
<?php } elseif ($footer_style == 'viewtopic') { ?>
<div class="btn-toolbar"><div class="btn-group"><a href="moderate.php?fid=<?php echo $forum_id ?>&tid=<?php echo $id ?>&p=<?php echo $p ?>" class="btn btn-primary btn-sm"><span class="glyphicon glyphicon-eye-open"></span> <?php echo $lang['Moderate topic'] ?></a></div>
<?php if($num_pages > 1) { ?>
<div class="btn-group"><a href="moderate.php?fid=<?php echo $forum_id ?>&tid=<?php echo $id ?>&action=all" class="btn btn-primary btn-sm"><span class="glyphicon glyphicon-list"></span> <?php echo $lang['All'] ?></a></div>
<?php } ?>
<div class="btn-group"><a href="moderate.php?fid=<?php echo $forum_id ?>&move_topics=<?php echo $id ?>" class="btn btn-primary btn-sm"><span class="glyphicon glyphicon-share-alt"></span> <?php echo $lang['Move topic'] ?></a>
<?php if ($cur_topic['closed'] == '1') { ?>
<a href="moderate.php?fid=<?php echo $forum_id ?>&open=<?php echo $id ?>" class="btn btn-success btn-sm"><span class="glyphicon glyphicon-ok"></span> <?php echo $lang['Open topic'] ?></a>
<?php } else { ?>
<a href="moderate.php?fid=<?php echo $forum_id ?>&close=<?php echo $id ?>" class="btn btn-danger btn-sm"><span class="glyphicon glyphicon-remove"></span> <?php echo $lang['Close topic'] ?></a>
<?php } ?>
<?php if ($cur_topic['sticky'] == '1') { ?>
<a href="moderate.php?fid=<?php echo $forum_id ?>&unstick=<?php echo $id ?>" class="btn btn-danger btn-sm"><span class="glyphicon glyphicon-pushpin"></span> <?php echo $lang['Unstick topic'] ?></a></div></div>
<?php } else { ?>
<a href="moderate.php?fid=<?php echo $forum_id ?>&stick=<?php echo $id ?>" class="btn btn-primary btn-sm"><span class="glyphicon glyphicon-pushpin"></span> <?php echo $lang['Stick topic'] ?></a></div></div>
<?php } ?>
<?php } ?>
<?php } ?>
<?php
// If no footer style has been specified, we use the default (only copyright/debug info)
$footer_style = isset($footer_style) ? $footer_style : NULL;
// Generate the feed links
if ($footer_style == 'index') {
$feed_lang = ($luna_config['o_feed_type'] == '1') ? $lang['RSS active topics feed'] : $lang['Atom active topics feed'];
$feed_id = '';
} elseif ($footer_style == 'viewforum') {
$feed_lang = ($luna_config['o_feed_type'] == '1') ? $lang['RSS forum feed'] : $lang['Atom forum feed'];
$feed_id = '&fid='.$forum_id;
} elseif ($footer_style == 'viewtopic') {
$feed_lang = ($luna_config['o_feed_type'] == '1') ? $lang['RSS topic feed'] : $lang['Atom topic feed'];
$feed_id = '&tid='.$id;
}
if ($luna_config['o_feed_type'] == 1) {
$feed_type = 'rss';
} elseif ($luna_config['o_feed_type'] == 2) {
$feed_type = 'atom';
}
if (($luna_config['o_feed_type'] == 1 || $luna_config['o_feed_type'] == 2) && (isset($footer_style))) {
'<span><a href="extern.php?action=feed&type='.$feed_type.$feed_id.'">'.$feed_lang.'</a></span>'."\n";
}
if (!defined('FORUM_FORM')) { ?>
<p><a href="#"><?php echo $lang['Back to top'] ?></a> <span class="pull-right" id="poweredby"><?php printf($lang['Powered by'], '<a href="http://modernbb.be/">ModernBB</a>'.(($luna_config['o_show_version'] == '1') ? ' '.$luna_config['o_cur_version'] : '')) ?></span></p>
<script src="//code.jquery.com/jquery-2.1.4.min.js"></script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<?php } ?>
</footer>
</div>
<?php if (($luna_config['o_cookie_bar'] == 1) && ($luna_user['is_guest']) && (!isset($_COOKIE['LunaCookieBar']))) { ?>
<div class="navbar navbar-inverse navbar-fixed-bottom cookie-bar">
<div class="container">
<p class="navbar-text"><?php echo $lang['Cookie info'] ?></p>
<form class="navbar-form navbar-right">
<div class="form-group">
<div class="btn-toolbar"><a class="btn btn-link" href="http://modernbb.be/docs/cookies.php"><?php echo $lang['More info'] ?></a><a class="btn btn-default" href="index.php?action=disable_cookiebar"><?php echo $lang['Do not show again'] ?></a></div>
</div>
</form>
</div>
</div>
<style>
body { margin-bottom: 40px; }
@media screen and (max-width: 767px) { body { margin-bottom: 80px; } }
</style>
<?php
}
// Display debug info (if enabled/defined)
if (defined('FORUM_DEBUG'))
{
echo '<p id="debug">[ ';
// Calculate script generation time
$time_diff = sprintf('%.3f', get_microtime() - $luna_start);
echo sprintf($lang['Querytime'], $time_diff, $db->get_num_queries());
if (function_exists('memory_get_usage'))
{
echo ' - '.sprintf($lang['Memory usage'], file_size(memory_get_usage()));
if (function_exists('memory_get_peak_usage'))
echo ' '.sprintf($lang['Peak usage'], file_size(memory_get_peak_usage()));
}
echo ' ]</p>'."\n";
}
// End the transaction
$db->end_transaction();
// Display executed queries (if enabled)
if (defined('FORUM_SHOW_QUERIES'))
display_saved_queries();
$tpl_temp = trim(ob_get_contents());
$tpl_main = str_replace('<luna_footer>', $tpl_temp, $tpl_main);
ob_end_clean();
// END SUBST - <luna_footer>
// Close the db connection (and free up any result data)
$db->close();
// Spit out the page
exit($tpl_main);