PageRenderTime 52ms CodeModel.GetById 24ms RepoModel.GetById 1ms app.codeStats 0ms

/footer.php

https://github.com/Dratone/EveBB
PHP | 180 lines | 123 code | 39 blank | 18 comment | 50 complexity | 52ad968a830348471b052c41bc8bc604 MD5 | raw file
Possible License(s): GPL-2.0
  1. <?php
  2. /**
  3. * Copyright (C) 2008-2010 FluxBB
  4. * based on code by Rickard Andersson copyright (C) 2002-2008 PunBB
  5. * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher
  6. */
  7. // Make sure no one attempts to run this script "directly"
  8. if (!defined('PUN'))
  9. exit;
  10. $tpl_temp = trim(ob_get_contents());
  11. $tpl_main = str_replace('<pun_main>', $tpl_temp, $tpl_main);
  12. ob_end_clean();
  13. // END SUBST - <pun_main>
  14. // START SUBST - <pun_footer>
  15. ob_start();
  16. ?>
  17. <div id="brdfooter" class="block">
  18. <h2><span><?php echo $lang_common['Board footer'] ?></span></h2>
  19. <div class="box">
  20. <?php
  21. if (isset($footer_style) && ($footer_style == 'viewforum' || $footer_style == 'viewtopic') && $is_admmod)
  22. {
  23. echo "\t\t".'<div id="modcontrols" class="inbox">'."\n";
  24. if ($footer_style == 'viewforum')
  25. {
  26. echo "\t\t\t".'<dl>'."\n";
  27. echo "\t\t\t\t".'<dt><strong>'.$lang_forum['Mod controls'].'</strong></dt>'."\n";
  28. 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";
  29. echo "\t\t\t".'</dl>'."\n";
  30. }
  31. else if ($footer_style == 'viewtopic')
  32. {
  33. echo "\t\t\t".'<dl>'."\n";
  34. echo "\t\t\t\t".'<dt><strong>'.$lang_topic['Mod controls'].'</strong></dt>'."\n";
  35. 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";
  36. 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";
  37. if ($cur_topic['closed'] == '1')
  38. 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";
  39. else
  40. 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";
  41. if ($cur_topic['sticky'] == '1')
  42. 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";
  43. else
  44. 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";
  45. echo "\t\t\t".'</dl>'."\n";
  46. }
  47. echo "\t\t\t".'<div class="clearer"></div>'."\n\t\t".'</div>'."\n";
  48. }
  49. ?>
  50. <div id="brdfooternav" class="inbox">
  51. <?php
  52. echo "\t\t\t".'<div class="conl">'."\n";
  53. // Display the "Jump to" drop list
  54. if ($pun_config['o_quickjump'] == '1')
  55. {
  56. $groups = '';
  57. $pun_user['group_ids'][] = $pun_user['g_id'];
  58. sort($pun_user['group_ids']);
  59. foreach($pun_user['group_ids'] as $g) {
  60. $groups .= intval($g).'-';
  61. } //End foreach().
  62. substr($groups, 0, -1);
  63. // Load cached quick jump
  64. if (file_exists(FORUM_CACHE_DIR.'cache_quickjump_'.$groups.'.php'))
  65. include FORUM_CACHE_DIR.'cache_quickjump_'.$groups.'.php';
  66. if (!defined('PUN_QJ_LOADED'))
  67. {
  68. if (!defined('FORUM_CACHE_FUNCTIONS_LOADED'))
  69. require PUN_ROOT.'include/cache.php';
  70. generate_quickjump_cache($groups);
  71. if (file_exists(FORUM_CACHE_DIR.'cache_quickjump_'.$groups.'.php')) {
  72. include FORUM_CACHE_DIR.'cache_quickjump_'.$groups.'.php';
  73. } //End if.
  74. }
  75. }
  76. echo "\t\t\t".'</div>'."\n";
  77. ?>
  78. <div class="conr">
  79. <?php
  80. // If no footer style has been specified, we use the default (only copyright/debug info)
  81. $footer_style = isset($footer_style) ? $footer_style : NULL;
  82. if ($footer_style == 'index')
  83. {
  84. if ($pun_config['o_feed_type'] == '1')
  85. 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";
  86. else if ($pun_config['o_feed_type'] == '2')
  87. 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";
  88. }
  89. else if ($footer_style == 'viewforum')
  90. {
  91. if ($pun_config['o_feed_type'] == '1')
  92. 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";
  93. else if ($pun_config['o_feed_type'] == '2')
  94. 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";
  95. }
  96. else if ($footer_style == 'viewtopic')
  97. {
  98. if ($pun_config['o_feed_type'] == '1')
  99. 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";
  100. else if ($pun_config['o_feed_type'] == '2')
  101. 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";
  102. }
  103. ?>
  104. <p id="poweredby"><a href="http://www.eve-bb.com">EveBB</a> is <?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>
  105. </div>
  106. <div class="clearer"></div>
  107. </div>
  108. </div>
  109. </div>
  110. <?php
  111. // Display debug info (if enabled/defined)
  112. if (defined('PUN_DEBUG'))
  113. {
  114. echo '<p id="debugtime">[ ';
  115. // Calculate script generation time
  116. $time_diff = sprintf('%.3f', get_microtime() - $pun_start);
  117. echo sprintf($lang_common['Querytime'], $time_diff, $db->get_num_queries());
  118. if (function_exists('memory_get_usage'))
  119. {
  120. echo ' - '.sprintf($lang_common['Memory usage'], file_size(memory_get_usage()));
  121. if (function_exists('memory_get_peak_usage'))
  122. echo ' '.sprintf($lang_common['Peak usage'], file_size(memory_get_peak_usage()));
  123. }
  124. echo ' ]</p>'."\n";
  125. }
  126. // End the transaction
  127. $db->end_transaction();
  128. // Display executed queries (if enabled)
  129. if (defined('PUN_SHOW_QUERIES'))
  130. display_saved_queries();
  131. if (defined('PUN_SHOW_REQUESTS')) {
  132. display_saved_requests();
  133. } //End if.
  134. $tpl_temp = trim(ob_get_contents());
  135. $tpl_main = str_replace('<pun_footer>', $tpl_temp, $tpl_main);
  136. ob_end_clean();
  137. // END SUBST - <pun_footer>
  138. // Close the db connection (and free up any result data)
  139. $db->close();
  140. // Spit out the page
  141. exit($tpl_main);