[2] | 1 | <?php |
---|
| 2 | /**************************************************************************\ |
---|
| 3 | * eGroupWare API - phpgwapi footer * |
---|
| 4 | * This file written by Dan Kuykendall <seek3r@phpgroupware.org> * |
---|
| 5 | * and Joseph Engo <jengo@phpgroupware.org> * |
---|
| 6 | * Closes out interface and db connections * |
---|
| 7 | * Copyright (C) 2000, 2001 Dan Kuykendall * |
---|
| 8 | * -------------------------------------------------------------------------* |
---|
| 9 | * This library is part of the eGroupWare API * |
---|
| 10 | * http://www.egroupware.org/api * |
---|
| 11 | * ------------------------------------------------------------------------ * |
---|
| 12 | * This library is free software; you can redistribute it and/or modify it * |
---|
| 13 | * under the terms of the GNU Lesser General Public License as published by * |
---|
| 14 | * the Free Software Foundation; either version 2.1 of the License, * |
---|
| 15 | * or any later version. * |
---|
| 16 | * This library is distributed in the hope that it will be useful, but * |
---|
| 17 | * WITHOUT ANY WARRANTY; without even the implied warranty of * |
---|
| 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * |
---|
| 19 | * See the GNU Lesser General Public License for more details. * |
---|
| 20 | * You should have received a copy of the GNU Lesser General Public License * |
---|
| 21 | * along with this library; if not, write to the Free Software Foundation, * |
---|
| 22 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * |
---|
| 23 | \**************************************************************************/ |
---|
| 24 | |
---|
| 25 | |
---|
| 26 | $d1 = strtolower(substr(PHPGW_APP_INC,0,3)); |
---|
| 27 | if($d1 == 'htt' || $d1 == 'ftp') |
---|
| 28 | { |
---|
| 29 | echo "Failed attempt to break in via an old Security Hole!<br>\n"; |
---|
| 30 | exit; |
---|
| 31 | } unset($d1); |
---|
| 32 | |
---|
| 33 | /**************************************************************************\ |
---|
| 34 | * Include the apps footer files if it exists * |
---|
| 35 | \**************************************************************************/ |
---|
| 36 | if (PHPGW_APP_INC != PHPGW_API_INC && // this prevents an endless inclusion on the homepage |
---|
| 37 | // (some apps set currentapp in hook_home => it's not releyable) |
---|
| 38 | (file_exists (PHPGW_APP_INC . '/footer.inc.php') || isset($_GET['menuaction'])) && |
---|
| 39 | $GLOBALS['phpgw_info']['flags']['currentapp'] != 'home' && |
---|
| 40 | $GLOBALS['phpgw_info']['flags']['currentapp'] != 'login' && |
---|
| 41 | $GLOBALS['phpgw_info']['flags']['currentapp'] != 'logout' && |
---|
| 42 | !@$GLOBALS['phpgw_info']['flags']['noappfooter']) |
---|
| 43 | { |
---|
| 44 | if ($_GET['menuaction']) |
---|
| 45 | { |
---|
| 46 | list($app,$class,$method) = explode('.',$_GET['menuaction']); |
---|
| 47 | if (is_array($GLOBALS[$class]->public_functions) && isset($GLOBALS[$class]->public_functions['footer'])) |
---|
| 48 | { |
---|
| 49 | // eval("\$GLOBALS[$class]->footer();"); |
---|
| 50 | $GLOBALS[$class]->footer(); |
---|
| 51 | } |
---|
| 52 | elseif(file_exists(PHPGW_APP_INC.'/footer.inc.php')) |
---|
| 53 | { |
---|
| 54 | include(PHPGW_APP_INC . '/footer.inc.php'); |
---|
| 55 | } |
---|
| 56 | } |
---|
| 57 | elseif(file_exists(PHPGW_APP_INC.'/footer.inc.php')) |
---|
| 58 | { |
---|
| 59 | include(PHPGW_APP_INC . '/footer.inc.php'); |
---|
| 60 | } |
---|
| 61 | } |
---|
| 62 | if ($GLOBALS['phpgw_info']['flags']['need_footer']) |
---|
| 63 | { |
---|
| 64 | echo $GLOBALS['phpgw_info']['flags']['need_footer']; |
---|
| 65 | } |
---|
| 66 | if(function_exists('parse_navbar_end')) |
---|
| 67 | { |
---|
| 68 | parse_navbar_end(); |
---|
| 69 | } |
---|
| 70 | if (DEBUG_TIMER) |
---|
| 71 | { |
---|
| 72 | $GLOBALS['debug_timer_stop'] = perfgetmicrotime(); |
---|
| 73 | echo 'Page loaded in ' . ($GLOBALS['debug_timer_stop'] - $GLOBALS['debug_timer_start']) . ' seconds.'; |
---|
| 74 | } |
---|
| 75 | |
---|
| 76 | /* |
---|
| 77 | * Verificação de permissão para o mensageiro instantâneo e a sua inicialização caso haja permissão |
---|
| 78 | */ |
---|
[424] | 79 | if ( $GLOBALS['phpgw_info']['apps']['jabberit_messenger'] ) |
---|
| 80 | require_once PHPGW_SERVER_ROOT . '/jabberit_messenger/inc/jabberit_acl.inc.php'; |
---|