| 1 |
djmaze |
1.1 |
<?php |
| 2 |
djmaze |
1.1 |
/********************************************* |
| 3 |
djmaze |
9.3 |
CPG Dragonfly™ CMS |
| 4 |
djmaze |
1.1 |
******************************************** |
| 5 |
nanocaio |
9.20 |
Copyright © 2004 - 2007 by CPG-Nuke Dev Team |
| 6 |
djmaze |
9.11 |
http://dragonflycms.org |
| 7 |
djmaze |
1.1 |
  |
| 8 |
djmaze |
8.13 |
Dragonfly is released under the terms and conditions |
| 9 |
djmaze |
8.4 |
of the GNU GPL version 2 or any later version |
| 10 |
djmaze |
1.1 |
  |
| 11 |
djmaze |
9.0 |
$Source: /cvs/html/footer.php,v $ |
| 12 |
nanocaio |
10.8 |
$Revision: 10.7 $ |
| 13 |
nanocaio |
10.2 |
$Author: nanocaiordo $ |
| 14 |
nanocaio |
10.8 |
$Date: 2011/12/02 12:56:48 $ |
| 15 |
djmaze |
8.13 |
**********************************************/ |
| 16 |
trevor |
8.7 |
if (!defined('CPG_NUKE')) { exit; } |
| 17 |
nanocaio |
10.4 |
global $db, $SESS, $cpgtpl, $Blocks, $DF; |
| 18 |
djmaze |
1.1 |
  |
| 19 |
djmaze |
1.1 |
function footmsg() { |
| 20 |
nanocaio |
10.2 |
global $db, $foot1, $foot2, $foot3, $total_time, $start_mem, $MAIN_CFG; |
| 21 |
nanocaio |
10.2 |
$foot = array($MAIN_CFG['global']['foot1'], $MAIN_CFG['global']['foot2'], $MAIN_CFG['global']['foot3']); |
| 22 |
nanocaio |
10.1 |
if (CPG_DEBUG || is_admin()) { |
| 23 |
djmaze |
9.33 |
$total_time = (microtime(true) - START_TIME - $db->time); |
| 24 |
nanocaio |
10.2 |
$foot[] = sprintf(_PAGEFOOTER, round($total_time,4), $db->num_queries, round($db->time,4)); |
| 25 |
trevor |
9.4 |
// only works if your PHP is compiled with the --enable-memory-limit configuration option |
| 26 |
trevor |
9.4 |
if (function_exists('memory_get_usage') && $start_mem > 0) { |
| 27 |
trevor |
9.4 |
$total_mem = memory_get_usage()-$start_mem; |
| 28 |
nanocaio |
10.2 |
$foot[] = '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')); |
| 29 |
trevor |
9.4 |
} |
| 30 |
nanocaio |
10.2 |
$foot[] = ''; |
| 31 |
nanocaio |
10.8 |
$S_DEBUG_SQL = CPG_DEBUG || $MAIN_CFG['debug']['database'] ? $GLOBALS['cpgdebugger']->get_report('sql') : false; |
| 32 |
nanocaio |
10.8 |
$S_DEBUG_PHP = CPG_DEBUG || $MAIN_CFG['debug']['error_level'] ? $GLOBALS['cpgdebugger']->get_report('php') : false; |
| 33 |
nanocaio |
10.8 |
$S_DEBUG_PER = CPG_DEBUG || DF_MODE_DEVELOPER ? PerformanceLog::stop() : false; |
| 34 |
trevor |
9.4 |
} |
| 35 |
nanocaio |
10.5 |
$GLOBALS['cpgtpl']->assign_var('S_DEBUG_SQL', isset($S_DEBUG_SQL) ? $S_DEBUG_SQL : false); |
| 36 |
nanocaio |
10.5 |
$GLOBALS['cpgtpl']->assign_var('S_DEBUG_PHP', isset($S_DEBUG_PHP) ? $S_DEBUG_PHP : false); |
| 37 |
nanocaio |
10.5 |
$GLOBALS['cpgtpl']->assign_var('S_DEBUG_PER', isset($S_DEBUG_PER) ? $S_DEBUG_PER : false); |
| 38 |
nanocaio |
10.2 |
return '<div style="text-align:center;" class="core_footer">'.implode("<br />\n", $foot).' |
| 39 |
phoenix |
9.21 |
Interactive software released under <a href="http://dragonflycms.org/GNUGPL.html" target="_blank" title="GNU Public License Agreement">GNU GPL</a>, |
| 40 |
nanocaio |
9.28 |
<a href="'.URL::index('credits').'">Code Credits</a>, |
| 41 |
nanocaio |
9.28 |
<a href="'.URL::index('privacy_policy').'">Privacy Policy</a></div>'; |
| 42 |
djmaze |
1.1 |
} |
| 43 |
djmaze |
1.1 |
  |
| 44 |
nanocaio |
10.2 |
themefooter(); |
| 45 |
nanocaio |
10.4 |
$DF->setState(DF::BOOT_DOWN); |
| 46 |
nanocaio |
10.7 |
$cpgtpl->destroy(); |
| 47 |
djmaze |
1.14 |
$SESS->write_close(); |
| 48 |
djmaze |
1.14 |
exit; |