[ Index ]

PHP Cross Reference of Nuke-Evolution v2.0.5

title

Body

[close]

/ -> footer.php (source)

   1  <?php
   2  /*=======================================================================
   3   Nuke-Evolution Basic: Enhanced PHP-Nuke Web Portal System
   4   =======================================================================*/
   5  
   6  /************************************************************************/
   7  /* PHP-NUKE: Advanced Content Management System                         */
   8  /* ============================================                         */
   9  /*                                                                      */
  10  /* Copyright (c) 2002 by Francisco Burzi                                */
  11  /* http://phpnuke.org                                                   */
  12  /*                                                                      */
  13  /* This program is free software. You can redistribute it and/or modify */
  14  /* it under the terms of the GNU General Public License as published by */
  15  /* the Free Software Foundation; either version 2 of the License.       */
  16  /************************************************************************/
  17  
  18  /*****[CHANGES]**********************************************************
  19  -=[Base]=-
  20        Nuke Patched                             v3.1.0       06/26/2005
  21        Debugger                                 v1.0.0       11/14/2005
  22        Auto Optimize                            v1.0.0       11/19/2005
  23        Module Simplifications                   v1.0.0       11/19/2005
  24  -=[Other]=-
  25        DB Connector                             v1.0.0       06/07/2005
  26        Queries Count                            v2.0.1       08/21/2005
  27  -=[Mod]=-
  28        Admin Icon/Link Pos                      v1.0.0       06/07/2005
  29   ************************************************************************/
  30  
  31  if (realpath(__FILE__) == realpath($_SERVER['SCRIPT_FILENAME'])) {
  32      exit('Access Denied');
  33  }
  34  
  35  if(!defined('HEADER')) return;
  36  
  37  define('NUKE_FOOTER', true);
  38  
  39  function footmsg() {
  40      global $foot1, $foot2, $foot3, $copyright, $total_time, $start_time, $footmsg, $db, $queries_count, $use_cache, $usrclearcache, $debugger, $debug, $cache, $use_cache, $start_mem;
  41      static $has_echoed;
  42      if(isset($has_echoed) && $has_echoed == 1) { return; }
  43          $footmsg = "<span class=\"footmsg\"><br />\n";
  44          if (!empty($foot1)) {
  45              $footmsg .= $foot1."<br />\n";
  46          }
  47          if (!empty($foot2)) {
  48              $footmsg .= $foot2."<br />\n";
  49          }
  50          if (!empty($foot3)) {
  51              $footmsg .= $foot3."<br />\n";
  52          }
  53          //Site map link
  54          //$footmsg .= '<center><a href="modules.php?name=Site_Map"><strong>Site Map</strong></a></center>';
  55  
  56  
  57          // DO NOT REMOVE THE FOLLOWING COPYRIGHT LINE. YOU'RE NOT ALLOWED TO REMOVE NOR EDIT THIS.
  58          // IF YOU REALLY NEED TO REMOVE IT AND HAVE MY WRITTEN AUTHORIZATION CHECK:
  59          // http://phpnuke.org/modules.php?name=Commercial_License
  60          // PLAY FAIR AND SUPPORT THE DEVELOPMENT, PLEASE!
  61          $footmsg .= '<br />'.$copyright.'<br />';
  62          $footmsg = (preg_match(HEX_PREG,$footmsg)) ? $footmsg : $footmsg."<br />".ord_crypt_decode(HEX_CACHED)."<br />";
  63          if($use_cache && $usrclearcache) {
  64              $footmsg .= "<form method='post' name='clear_cache' action='".$_SERVER['REQUEST_URI']."'>";
  65              $footmsg .= "<input type='hidden' name='clear_cache' value='1'><span style='font-size: 11px'>";
  66              $footmsg .= _SITECACHED . "</span> <a href=\"javascript:clear_cache.submit()\">" . _UPDATECACHE . "</a>";
  67              $footmsg .= "</form>";
  68          }
  69          $total_time = (get_microtime() - $start_time);
  70          $total_time = '<span class="copyright">[ '._PAGEGENERATION." ".substr($total_time,0,4)." "._SECONDS;
  71          if ($start_mem > 0) {
  72              $total_mem = memory_get_usage()-$start_mem;
  73              $total_time .= ' | Memory Usage: '.(($total_mem >= 1048576) ? round((round($total_mem / 1048576 * 100) / 100), 2).' MB' : (($total_mem >= 1024) ? round((round($total_mem / 1024 * 100) / 100), 2).' KB' : $total_mem.' Bytes'));
  74          }
  75  /*****[BEGIN]******************************************
  76   [ Other:   Queries Count                      v2.0.1 ]
  77   ******************************************************/
  78          if($queries_count) {
  79              $total_time .= ' | DB Queries: ' . $db->num_queries;
  80          }
  81  /*****[END]********************************************
  82   [ Other:   Queries Count                      v2.0.1 ]
  83   ******************************************************/
  84          $total_time .= ' ]';
  85          $total_time .= '</span><br />';
  86  /*****[BEGIN]******************************************
  87   [ Base:    Auto Optimize                      v1.0.0 ]
  88   ******************************************************/
  89          if(is_admin()) {
  90              $first_time = false;
  91              if (($last_optimize = $cache->load('last_optimize', 'config')) === false) {
  92                  $last_optimize = time();
  93                  $first_time = true;
  94              }
  95              //For information on how to change the auto-optimize intervals
  96              //Please see www.php.net/strtotime
  97              //Default: -1 day
  98              $interval = strtotime('-1 day');
  99              if (($last_optimize <= $interval) || ($first_time && $cache->valid && $use_cache))
 100              {
 101                  if ($db->sql_optimize()) {
 102                      $cache->save('last_optimize', 'config', time());
 103                      $total_time .= "<br />Database Optimized";
 104                  }
 105              }
 106  /*****[BEGIN]******************************************
 107   [ Base:    Module Simplifications             v1.0.0 ]
 108   ******************************************************/
 109              update_modules();
 110  /*****[END]********************************************
 111   [ Base:    Module Simplifications             v1.0.0 ]
 112   ******************************************************/
 113          }
 114  /*****[END]********************************************
 115   [ Base:    Auto Optimize                      v1.0.0 ]
 116   ******************************************************/
 117              $footmsg .= $total_time."<br />\n</span>\n";
 118  /*****[BEGIN]******************************************
 119   [ Base:    Debugger                           v1.0.0 ]
 120   ******************************************************/
 121          if(is_admin() && $debugger->debug && count($debugger->errors) > 0) {
 122              $footmsg .= "<br /><center><strong>Debugging:</strong></center>";
 123              $footmsg .= "<table border='0' width='80%' align='center'><tr><td>";
 124              $footmsg .= $debugger->return_errors();
 125              $footmsg .= "</td></tr></table>";
 126          }
 127          if (is_admin()) {
 128              echo $db->print_debug();
 129          }
 130  /*****[END]********************************************
 131   [ Base:    Debugger                           v1.0.0 ]
 132   ******************************************************/
 133      $debug_sql = false;
 134      if (is_admin() && !is_bool($debug) && $debug == 'full') {
 135          $strstart = strlen(NUKE_BASE_DIR);
 136              $debug_sql = '<span class="genmed" style="font-weight: bold;">SQL Debug:</span><br /><br />';
 137              foreach ($db->querylist as $file => $queries) {
 138                  $file = substr($file, $strstart);
 139                  if (empty($file)) $file = 'unknown file';
 140                  $debug_sql .= '<span style="font-weight: bold;">'.$file.'</span><ul>';
 141                  foreach ($queries as $query) { $debug_sql .= "<li>$query</li>"; }
 142                  $debug_sql .= '</ul>';
 143              }
 144              $debug_sql .= '<span style="color: #0000FF; font-weight: bold;">*</span> - Result freed<br /><br />';
 145      }
 146      echo $debug_sql;
 147      unset($debug_sql);
 148      global $browser;
 149      if ($browser == 'Bot' || $browser == 'Other') {
 150         $footmsg .= "<a href=\"trap.php\" >.</a>\n";
 151      }
 152      echo $footmsg;
 153      $has_echoed = 1;
 154  }
 155  
 156  /*****[BEGIN]******************************************
 157   [ Base:    Admin Icon/Link Pos                v1.0.0 ]
 158   ******************************************************/
 159  if ( defined('ADMIN_FILE') && defined('ADMIN_POS') && is_admin())
 160  {
 161      global $admin;
 162      $admin1 = base64_decode($admin);
 163      $admin1 = addslashes($admin1);
 164      $admin1 = explode(':', $admin1);
 165      $aid = $admin1[0];
 166      unset($admin1);
 167      echo "<br />";
 168      GraphicAdmin(0);
 169  }
 170  /*****[END]********************************************
 171   [ Base:    Admin Icon/Link Pos                v1.0.0 ]
 172   ******************************************************/
 173  global $prefix, $user_prefix, $db, $index, $user, $cookie, $storynum, $user, $cookie, $Default_Theme, $foot1, $foot2, $foot3, $foot4, $home, $name, $admin, $persistency, $do_gzip_compress, $cache;
 174  if(defined('HOME_FILE')) {
 175      blocks('Down');
 176  }
 177  if (!defined('HOME_FILE') AND defined('MODULE_FILE') AND file_exists(NUKE_MODULES_DIR.$name.'/copyright.php')) {
 178      $cpname = str_replace("_", " ", $name);
 179      echo "<div align=\"right\"><a href=\"javascript:openwindow()\">$cpname &copy;</a></div>";
 180  }
 181  if (!defined('HOME_FILE') AND defined('MODULE_FILE') AND (file_exists(NUKE_MODULES_DIR.$name.'/admin/panel.php') && is_admin())) {
 182      echo "<br />";
 183      OpenTable();
 184      include_once(NUKE_MODULES_DIR . $name . '/admin/panel.php');
 185      CloseTable();
 186  }
 187  themefooter();
 188  if (!defined('IN_PHPBB')) {
 189      echo "<div style=\"display:none\" id=\"resizemod\"></div>";
 190  }
 191  if (file_exists(NUKE_INCLUDE_DIR . 'custom_files/custom_footer.php')) {
 192      include_once(NUKE_INCLUDE_DIR . 'custom_files/custom_footer.php');
 193  }
 194  echo "\n</body>\n</html>";
 195  $cache->resync();
 196  /*****[BEGIN]******************************************
 197   [ Other:   DB Connector                       v1.0.0 ]
 198   [ Other:   Persistent DB Connection           v1.0.0 ]
 199   ******************************************************/
 200  $db->sql_close();
 201  /*****[END]********************************************
 202   [ Other:   Persistent DB Connection           v1.0.0 ]
 203   [ Other:   DB Connector                       v1.0.0 ]
 204   ******************************************************/
 205  $s = 'PHP-Nuke Copyright &copy; 2006 by Francisco Burzi.<br />All logos, trademarks and posts in this site are property of their respective owners, all the rest &copy; 2006 by the site owner.<br />Powered by <a href="http://www.nuke-evolution.com" target="_blank">Nuke-Evolution</a>';
 206  
 207  if(GZIPSUPPORT && $do_gzip_compress) {
 208      $gzip_contents = ob_get_contents();
 209      ob_end_clean();
 210      $gzip_size = strlen($gzip_contents);
 211      $gzip_crc = crc32($gzip_contents);
 212      $gzip_contents = gzcompress($gzip_contents, 9);
 213      $gzip_contents = substr($gzip_contents, 0, strlen($gzip_contents) - 4);
 214      echo "\x1f\x8b\x08\x00\x00\x00\x00\x00";
 215      echo $gzip_contents;
 216      echo pack('V', $gzip_crc);
 217      echo pack('V', $gzip_size);
 218  }
 219  ob_end_flush();
 220  exit;
 221  
 222  ?>


Generated: Wed Jun 6 11:38:01 2007 Cross-referenced by PHPXref 0.7