* * -------------------------------------------- * * This program is free software; you can redistribute it and/or modify it * * under the terms of the GNU General Public License as published by the * * Free Software Foundation; either version 2 of the License, or (at your * * option) any later version. * \**************************************************************************/ /* $Id$ */ if (!is_file('header.inc.php')) { echo '
It appears that phpGroupWare is not setup yet, please click ' . 'here.
'; exit; } $GLOBALS['sessionid'] = $GLOBALS['HTTP_GET_VARS']['sessionid'] ? $GLOBALS['HTTP_GET_VARS']['sessionid'] : $GLOBALS['HTTP_COOKIE_VARS']['sessionid']; if (!isset($GLOBALS['sessionid']) || !$GLOBALS['sessionid']) { Header('Location: login.php'); exit; } $GLOBALS['phpgw_info']['flags'] = array( 'noheader' => True, 'nonavbar' => True, 'currentapp' => 'home', 'enable_network_class' => True, 'enable_contacts_class' => True, 'enable_nextmatchs_class' => True ); include('header.inc.php'); if ($GLOBALS['phpgw_forward']) { while (list($name,$value) = each($HTTP_GET_VARS)) { if (ereg('phpgw_',$name)) { $extra_vars .= '&' . $name . '=' . urlencode($value); } } $GLOBALS['phpgw']->redirect($GLOBALS['phpgw']->link($GLOBALS['phpgw_forward'],$extra_vars)); } if ($GLOBALS['phpgw_info']['server']['force_default_app'] && $GLOBALS['phpgw_info']['server']['force_default_app'] != 'user_choice') { $GLOBALS['phpgw_info']['user']['preferences']['common']['default_app'] = $GLOBALS['phpgw_info']['server']['force_default_app']; } if (($GLOBALS['phpgw_info']['user']['preferences']['common']['useframes'] && $GLOBALS['phpgw_info']['server']['useframes'] == 'allowed') || ($GLOBALS['phpgw_info']['server']['useframes'] == 'always')) { if ($GLOBALS['HTTP_GET_VARS']['cd'] == 'yes') { if (! $navbarframe && ! $framebody) { $tpl = new Template(PHPGW_TEMPLATE_DIR); $tpl->set_file(array( 'frames' => 'frames.tpl', 'frame_body' => 'frames_body.tpl', 'frame_navbar' => 'frames_navbar.tpl' )); $tpl->set_var('navbar_link',$GLOBALS['phpgw']->link('index.php','navbarframe=True&cd=yes')); if ($GLOBALS['forward']) { $tpl->set_var('body_link',$GLOBALS['phpgw']->link($GLOBALS['forward'])); } else { $tpl->set_var('body_link',$GLOBALS['phpgw']->link('index.php','framebody=True&cd=yes')); } if ($GLOBALS['phpgw_info']['user']['preferences']['common']['frame_navbar_location'] == 'bottom') { $tpl->set_var('frame_size','*,60'); $tpl->parse('frames_','frame_body',True); $tpl->parse('frames_','frame_navbar',True); } else { $tpl->set_var('frame_size','60,*'); $tpl->parse('frames_','frame_navbar',True); $tpl->parse('frames_','frame_body',True); } $tpl->pparse('out','frames'); } if ($navbarframe) { $GLOBALS['phpgw']->common->phpgw_header(); echo parse_navbar(); } } } elseif ($GLOBALS['HTTP_GET_VARS']['cd']=='yes' && $GLOBALS['phpgw_info']['user']['preferences']['common']['default_app'] && $GLOBALS['phpgw_info']['user']['apps'][$GLOBALS['phpgw_info']['user']['preferences']['common']['default_app']]) { $GLOBALS['phpgw']->redirect($GLOBALS['phpgw']->link('/' . $GLOBALS['phpgw_info']['user']['preferences']['common']['default_app'] . '/' . 'index.php')); $GLOBALS['phpgw']->common->phpgw_exit(); } else { $GLOBALS['phpgw']->common->phpgw_header(); echo parse_navbar(); } $GLOBALS['phpgw']->db->query("select app_version from phpgw_applications where app_name='phpgwapi'",__LINE__,__FILE__); if($GLOBALS['phpgw']->db->next_record()) { $apiversion = $GLOBALS['phpgw']->db->f('app_version'); } else { $GLOBALS['phpgw']->db->query("select app_version from phpgw_applications where app_name='admin'",__LINE__,__FILE__); $GLOBALS['phpgw']->db->next_record(); $apiversion = $GLOBALS['phpgw']->db->f('app_version'); } if ($GLOBALS['phpgw_info']['server']['versions']['phpgwapi'] > $apiversion) { echo '

' . lang('You are running a newer version of phpGroupWare than your database is setup for') . '.' . '
' . lang('It is recommended that you run setup to upgrade your tables to the current version') . '.' . '
'; } $GLOBALS['phpgw']->translation->add_app('mainscreen'); if (lang('mainscreen_message') != 'mainscreen_message*') { echo '

' . stripslashes(lang('mainscreen_message')) . '
'; } if ((isset($GLOBALS['phpgw_info']['user']['apps']['admin']) && $GLOBALS['phpgw_info']['user']['apps']['admin']) && (isset($GLOBALS['phpgw_info']['server']['checkfornewversion']) && $GLOBALS['phpgw_info']['server']['checkfornewversion'])) { $GLOBALS['phpgw']->network->set_addcrlf(False); $lines = $GLOBALS['phpgw']->network->gethttpsocketfile('http://www.phpgroupware.org/currentversion'); for ($i=0; $icommon->cmp_version($GLOBALS['phpgw_info']['server']['versions']['phpgwapi'],$line_found[1])) { echo '

There is a new version of phpGroupWare available. http://www.phpgroupware.org'; } } ?> '; //Uncomment the next line to enable the notify window. It will not work until a notifywindow app is added. echo '' . lang('Open notify window') . ''; $GLOBALS['phpgw']->common->hook('home',array('email','calendar','news','addressbook')); //$phpgw->common->debug_phpgw_info(); //$phpgw->common->debug_list_core_functions(); ?>
common->phpgw_footer(); ?>