Ignore:
Timestamp:
Nov 14, 2011, 11:17:15 PM (12 years ago)
Author:
dj3c1t
Message:

passage a Fluxbb 1.4.7

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/rsr.v5.1.dev/web/punbb/footer.php

    r1 r3  
    11<?php
    2 /***********************************************************************
    32
    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 
     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 */
    378
    389// Make sure no one attempts to run this script "directly"
     
    5324        <h2><span><?php echo $lang_common['Board footer'] ?></span></h2>
    5425        <div class="box">
    55                 <div class="inbox">
     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">
    5689<?php
    5790
     
    5992$footer_style = isset($footer_style) ? $footer_style : NULL;
    6093
    61 if ($footer_style == 'index' || $footer_style == 'search')
     94if ($footer_style == 'index')
    6295{
    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         }
     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";
    81100}
    82 else if ($footer_style == 'viewforum' || $footer_style == 'viewtopic')
     101else if ($footer_style == 'viewforum')
    83102{
    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";
     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";
    118114}
    119115
    120116?>
    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>
     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>
    122123<?php
    123124
     
    125126if (defined('PUN_DEBUG'))
    126127{
     128        echo '<p id="debugtime">[ ';
     129
    127130        // 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        $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";
    131143}
    132 
    133 ?>
    134                         <div class="clearer"></div>
    135                 </div>
    136         </div>
    137 </div>
    138 <?php
    139144
    140145
     
    152157
    153158
    154 // START SUBST - <pun_include "*">
    155 while (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 
    169159// Close the db connection (and free up any result data)
    170 // $db->close();
     160//$db->close();
    171161
    172162// Spit out the page
Note: See TracChangeset for help on using the changeset viewer.