[ Index ]
 

Code source de PunBB 1.2.16

Accédez au Source d'autres logiciels libres

title

Body

[fermer]

/upload/ -> footer.php (source)

   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  
  26  // Make sure no one attempts to run this script "directly"

  27  if (!defined('PUN'))
  28      exit;
  29  
  30  $tpl_temp = trim(ob_get_contents());
  31  $tpl_main = str_replace('<pun_main>', $tpl_temp, $tpl_main);
  32  ob_end_clean();
  33  // END SUBST - <pun_main>

  34  
  35  
  36  // START SUBST - <pun_footer>

  37  ob_start();
  38  
  39  ?>
  40  <div id="brdfooter" class="block">
  41      <h2><span><?php echo $lang_common['Board footer'] ?></span></h2>
  42      <div class="box">
  43          <div class="inbox">
  44  <?php
  45  
  46  // If no footer style has been specified, we use the default (only copyright/debug info)

  47  $footer_style = isset($footer_style) ? $footer_style : NULL;
  48  
  49  if ($footer_style == 'index' || $footer_style == 'search')
  50  {
  51      if (!$pun_user['is_guest'])
  52      {
  53          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";
  54          echo "\t\t\t\t".'<dd><a href="search.php?action=show_unanswered">'.$lang_common['Show unanswered posts'].'</a></dd>'."\n";
  55  
  56          if ($pun_config['o_subscriptions'] == '1')
  57              echo "\t\t\t\t".'<dd><a href="search.php?action=show_subscriptions">'.$lang_common['Show subscriptions'].'</a></dd>'."\n";
  58  
  59          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";
  60      }
  61      else
  62      {
  63          if ($pun_user['g_search'] == '1')
  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><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\t\t\t".'</dl>'."\n";
  67          }
  68      }
  69  }
  70  else if ($footer_style == 'viewforum' || $footer_style == 'viewtopic')
  71  {
  72      echo "\n\t\t\t".'<div class="conl">'."\n";
  73  
  74      // Display the "Jump to" drop list

  75      if ($pun_config['o_quickjump'] == '1')
  76      {
  77          // Load cached quickjump

  78          @include PUN_ROOT.'cache/cache_quickjump_'.$pun_user['g_id'].'.php';
  79          if (!defined('PUN_QJ_LOADED'))
  80          {
  81              require_once  PUN_ROOT.'include/cache.php';
  82              generate_quickjump_cache($pun_user['g_id']);
  83              require PUN_ROOT.'cache/cache_quickjump_'.$pun_user['g_id'].'.php';
  84          }
  85      }
  86  
  87      if ($footer_style == 'viewforum' && $is_admmod)
  88          echo "\t\t\t".'<p id="modcontrols"><a href="moderate.php?fid='.$forum_id.'&amp;p='.$p.'">'.$lang_common['Moderate forum'].'</a></p>'."\n";
  89      else if ($footer_style == 'viewtopic' && $is_admmod)
  90      {
  91          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";
  92          echo "\t\t\t".'<dd><a href="moderate.php?fid='.$forum_id.'&amp;move_topics='.$id.'">'.$lang_common['Move topic'].'</a></dd>'."\n";
  93  
  94          if ($cur_topic['closed'] == '1')
  95              echo "\t\t\t".'<dd><a href="moderate.php?fid='.$forum_id.'&amp;open='.$id.'">'.$lang_common['Open topic'].'</a></dd>'."\n";
  96          else
  97              echo "\t\t\t".'<dd><a href="moderate.php?fid='.$forum_id.'&amp;close='.$id.'">'.$lang_common['Close topic'].'</a></dd>'."\n";
  98  
  99          if ($cur_topic['sticky'] == '1')
 100              echo "\t\t\t".'<dd><a href="moderate.php?fid='.$forum_id.'&amp;unstick='.$id.'">'.$lang_common['Unstick topic'].'</a></dd></dl>'."\n";
 101          else
 102              echo "\t\t\t".'<dd><a href="moderate.php?fid='.$forum_id.'&amp;stick='.$id.'">'.$lang_common['Stick topic'].'</a></dd></dl>'."\n";
 103      }
 104  
 105      echo "\t\t\t".'</div>'."\n";
 106  }
 107  
 108  ?>
 109            <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>
 110  <?php
 111  
 112  // Display debug info (if enabled/defined)

 113  if (defined('PUN_DEBUG'))
 114  {
 115      // Calculate script generation time

 116      list($usec, $sec) = explode(' ', microtime());
 117      $time_diff = sprintf('%.3f', ((float)$usec + (float)$sec) - $pun_start);
 118      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";
 119  }
 120  
 121  ?>
 122              <div class="clearer"></div>
 123          </div>
 124      </div>
 125  </div>
 126  <?php
 127  
 128  
 129  // End the transaction

 130  $db->end_transaction();
 131  
 132  // Display executed queries (if enabled)

 133  if (defined('PUN_SHOW_QUERIES'))
 134      display_saved_queries();
 135  
 136  $tpl_temp = trim(ob_get_contents());
 137  $tpl_main = str_replace('<pun_footer>', $tpl_temp, $tpl_main);
 138  ob_end_clean();
 139  // END SUBST - <pun_footer>

 140  
 141  
 142  // Close the db connection (and free up any result data)

 143  $db->close();
 144  
 145  // Spit out the page

 146  exit($tpl_main);


Généré le : Sat Nov 24 22:44:38 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics