| 1 | <?php |
|---|
| 2 | // $Id: footer.php,v 1.6 2006/05/01 02:37:26 onokazu Exp $ |
|---|
| 3 | // ------------------------------------------------------------------------ // |
|---|
| 4 | // XOOPS - PHP Content Management System // |
|---|
| 5 | // Copyright (c) 2005 XOOPS.org // |
|---|
| 6 | // <http://www.xoops.org/> // |
|---|
| 7 | // ------------------------------------------------------------------------ // |
|---|
| 8 | // This program is free software; you can redistribute it and/or modify // |
|---|
| 9 | // it under the terms of the GNU General Public License as published by // |
|---|
| 10 | // the Free Software Foundation; either version 2 of the License, or // |
|---|
| 11 | // (at your option) any later version. // |
|---|
| 12 | // // |
|---|
| 13 | // You may not change or alter any portion of this comment or credits // |
|---|
| 14 | // of supporting developers from this source code or any supporting // |
|---|
| 15 | // source code which is considered copyrighted (c) material of the // |
|---|
| 16 | // original comment or credit authors. // |
|---|
| 17 | // // |
|---|
| 18 | // This program is distributed in the hope that it will be useful, // |
|---|
| 19 | // but WITHOUT ANY WARRANTY; without even the implied warranty of // |
|---|
| 20 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // |
|---|
| 21 | // GNU General Public License for more details. // |
|---|
| 22 | // // |
|---|
| 23 | // You should have received a copy of the GNU General Public License // |
|---|
| 24 | // along with this program; if not, write to the Free Software // |
|---|
| 25 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // |
|---|
| 26 | // ------------------------------------------------------------------------ // |
|---|
| 27 | |
|---|
| 28 | if (!defined('XOOPS_ROOT_PATH')) { |
|---|
| 29 | exit(); |
|---|
| 30 | } |
|---|
| 31 | if ( !defined("XOOPS_FOOTER_INCLUDED") ) { |
|---|
| 32 | define("XOOPS_FOOTER_INCLUDED",1); |
|---|
| 33 | $xoopsLogger->stopTime(); |
|---|
| 34 | if ($xoopsOption['theme_use_smarty'] == 0) { |
|---|
| 35 | // the old way |
|---|
| 36 | $footer = htmlspecialchars($xoopsConfigMetaFooter['footer']).'<br /><div style="text-align:center">Powered by XOOPS Cube © 2005-2006 <a href="http://xoopscube.org/" target="_blank">The XOOPS Cube Project</a></div>'; |
|---|
| 37 | if (isset($xoopsOption['template_main'])) { |
|---|
| 38 | $xoopsTpl->xoops_setCaching(0); |
|---|
| 39 | $xoopsTpl->display('db:'.$xoopsOption['template_main']); |
|---|
| 40 | } |
|---|
| 41 | if (!isset($xoopsOption['show_rblock'])) { |
|---|
| 42 | $xoopsOption['show_rblock'] = 0; |
|---|
| 43 | } |
|---|
| 44 | themefooter($xoopsOption['show_rblock'], $footer); |
|---|
| 45 | xoops_footer(); |
|---|
| 46 | } else { |
|---|
| 47 | // RMV-NOTIFY |
|---|
| 48 | include_once XOOPS_ROOT_PATH . '/include/notification_select.php'; |
|---|
| 49 | if (isset($xoopsOption['template_main'])) { |
|---|
| 50 | if (isset($xoopsCachedTemplateId)) { |
|---|
| 51 | $xoopsTpl->assign('xoops_contents', $xoopsTpl->fetch($xoopsOption['template_main'], $xoopsCachedTemplateId)); |
|---|
| 52 | } else { |
|---|
| 53 | $xoopsTpl->assign('xoops_contents', $xoopsTpl->fetch($xoopsOption['template_main'])); |
|---|
| 54 | } |
|---|
| 55 | } else { |
|---|
| 56 | if (isset($xoopsCachedTemplate)) { |
|---|
| 57 | $xoopsTpl->assign('dummy_content', ob_get_contents()); |
|---|
| 58 | $xoopsTpl->assign('xoops_contents', $xoopsTpl->fetch($xoopsCachedTemplate, $xoopsCachedTemplateId)); |
|---|
| 59 | } else { |
|---|
| 60 | $xoopsTpl->assign('xoops_contents', ob_get_contents()); |
|---|
| 61 | } |
|---|
| 62 | ob_end_clean(); |
|---|
| 63 | } |
|---|
| 64 | if (!headers_sent()) { |
|---|
| 65 | header('Content-Type:text/html; charset='._CHARSET); |
|---|
| 66 | header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); |
|---|
| 67 | header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); |
|---|
| 68 | header('Cache-Control: no-store, no-cache, must-revalidate'); |
|---|
| 69 | header('Cache-Control: post-check=0, pre-check=0', false); |
|---|
| 70 | header('Pragma: no-cache'); |
|---|
| 71 | } |
|---|
| 72 | $xoopsTpl->xoops_setCaching(0); |
|---|
| 73 | $xoopsTpl->display($xoopsConfig['theme_set'].'/theme.html'); |
|---|
| 74 | } |
|---|
| 75 | if ($xoopsConfig['debug_mode'] == 2 && $xoopsUserIsAdmin) { |
|---|
| 76 | echo '<script type="text/javascript"> |
|---|
| 77 | <!--// |
|---|
| 78 | debug_window = openWithSelfMain("", "xoops_debug", 680, 600, true); |
|---|
| 79 | '; |
|---|
| 80 | $content = '<html><head><meta http-equiv="content-type" content="text/html; charset='._CHARSET.'" /><meta http-equiv="content-language" content="'._LANGCODE.'" /><title>'.htmlspecialchars($xoopsConfig['sitename']).'</title><link rel="stylesheet" type="text/css" media="all" href="'.getcss($xoopsConfig['theme_set']).'" /></head><body>'.$xoopsLogger->dumpAll().'<div style="text-align:center;"><input class="formButton" value="'._CLOSE.'" type="button" onclick="javascript:window.close();" /></div></body></html>'; |
|---|
| 81 | $lines = preg_split("/(\r\n|\r|\n)( *)/", $content); |
|---|
| 82 | foreach ($lines as $line) { |
|---|
| 83 | echo 'debug_window.document.writeln("'.str_replace('"', '\"', $line).'");'; |
|---|
| 84 | } |
|---|
| 85 | echo ' |
|---|
| 86 | debug_window.document.close(); |
|---|
| 87 | //--> |
|---|
| 88 | </script>'; |
|---|
| 89 | } |
|---|
| 90 | } |
|---|
| 91 | ?> |
|---|