Changeset 2529


Ignore:
Timestamp:
04/14/10 16:02:25 (14 years ago)
Author:
rodsouza
Message:

Ticket #1009 - Habilitando cache para as requisições realizadas para os scripts 'index'.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/expressoMail1_2/index.php

    r2519 r2529  
    11<?php 
    22 
    3 /*************************************************************************** 
    4         * Expresso Livre                                                           * 
    5         * http://www.expressolivre.org                                             * 
    6         * --------------------------------------------                             * 
    7         *  This program is free software; you can redistribute it and/or modify it * 
    8         *  under the terms of the GNU General Public License as published by the   * 
    9         *  Free Software Foundation; either version 2 of the License, or (at your  * 
    10         *  option) any later version.                                              * 
    11         \**************************************************************************/ 
    12                  
    13         $GLOBALS['phpgw_info']['flags'] = array( 
    14                 //'noheader' => False, 
    15                 //'nonavbar' => False, 
    16                 'currentapp' => 'expressoMail1_2', 
    17                 'update_version'        => '1.235', 
    18                 'enable_nextmatchs_class' => True 
    19         ); 
    20  
    21         require_once('../header.inc.php'); 
    22  
    23         include_once("inc/load_lang.php"); 
    24  
    25         $_SESSION['phpgw_info']['expressomail']['user'] = $GLOBALS['phpgw_info']['user']; 
    26  
    27         //Enable/Disable VoIP Service -> Voip Server Config 
    28         $voip_enabled = false; 
    29         $voip_groups = array();  
    30         if($GLOBALS['phpgw_info']['server']['voip_groups']) { 
    31                 $emailVoip = false; 
    32                 foreach(explode(",",$GLOBALS['phpgw_info']['server']['voip_groups']) as $i => $voip_group){ 
    33                         $a_voip = explode(";",$voip_group);                      
    34                         $voip_groups[] = $a_voip[1]; 
    35                 } 
    36                 foreach($GLOBALS['phpgw']->accounts->membership() as $idx => $group){                    
    37                         if(array_search($group['account_name'],$voip_groups) !== FALSE){                  
    38                                 $voip_enabled = true; 
    39                                 $emailVoip = $GLOBALS['phpgw_info']['server']['voip_email_redirect']; 
    40                                 break; 
    41                         } 
     3/**************************************************************************\ 
     4* Expresso Livre                                                           * 
     5* http://www.expressolivre.org                                             * 
     6* --------------------------------------------                             * 
     7*  This program is free software; you can redistribute it and/or modify it * 
     8*  under the terms of the GNU General Public License as published by the   * 
     9*  Free Software Foundation; either version 2 of the License, or (at your  * 
     10*  option) any later version.                                              * 
     11\**************************************************************************/ 
     12 
     13$GLOBALS['phpgw_info']['flags'] = array( 
     14        //'noheader' => False, 
     15        //'nonavbar' => False, 
     16        'currentapp' => 'expressoMail1_2', 
     17        'update_version'        => '1.235', 
     18        'enable_nextmatchs_class' => True 
     19); 
     20 
     21require_once('../header.inc.php'); 
     22 
     23include_once("inc/load_lang.php"); 
     24 
     25$_SESSION['phpgw_info']['expressomail']['user'] = $GLOBALS['phpgw_info']['user']; 
     26 
     27//Enable/Disable VoIP Service -> Voip Server Config 
     28$voip_enabled = false; 
     29$voip_groups = array(); 
     30if($GLOBALS['phpgw_info']['server']['voip_groups']) { 
     31        $emailVoip = false; 
     32        foreach(explode(",",$GLOBALS['phpgw_info']['server']['voip_groups']) as $i => $voip_group){ 
     33                $a_voip = explode(";",$voip_group); 
     34                $voip_groups[] = $a_voip[1]; 
     35        } 
     36        foreach($GLOBALS['phpgw']->accounts->membership() as $idx => $group){ 
     37                if(array_search($group['account_name'],$voip_groups) !== FALSE){ 
     38                        $voip_enabled = true; 
     39                        $emailVoip = $GLOBALS['phpgw_info']['server']['voip_email_redirect']; 
     40                        break; 
    4241                } 
    4342        } 
    44  
    45         // Get Data from ldap_manager and emailadmin. 
    46         $ldap_manager = CreateObject('contactcenter.bo_ldap_manager'); 
    47         $boemailadmin   = CreateObject('emailadmin.bo'); 
    48         $emailadmin_profile = $boemailadmin->getProfileList(); 
    49     // Loading Admin Config Module 
    50     $c = CreateObject('phpgwapi.config','expressoMail1_2'); 
    51     $c->read_repository(); 
    52     $current_config = $c->config_data;     
    53  
    54         $_SESSION['phpgw_info']['expressomail']['email_server'] = $boemailadmin->getProfile($emailadmin_profile[0]['profileID']); 
     43} 
     44 
     45// Get Data from ldap_manager and emailadmin. 
     46$ldap_manager = CreateObject('contactcenter.bo_ldap_manager'); 
     47$boemailadmin = CreateObject('emailadmin.bo'); 
     48$emailadmin_profile = $boemailadmin->getProfileList(); 
     49 
     50// Loading Admin Config Module 
     51$c = CreateObject('phpgwapi.config','expressoMail1_2'); 
     52$c->read_repository(); 
     53$current_config = $c->config_data; 
     54 
     55$_SESSION['phpgw_info']['expressomail']['email_server'] = $boemailadmin->getProfile($emailadmin_profile[0]['profileID']); 
    5556//      $_SESSION['phpgw_info']['expressomail']['user'] = $GLOBALS['phpgw_info']['user']; 
    56         $_SESSION['phpgw_info']['expressomail']['max_folders_to_show'] = $current_config['expressoMail_Max_folders_to_show'] ? $current_config['expressoMail_Max_folders_to_show'] : "200"; 
    57         $_SESSION['phpgw_info']['expressomail']['server'] = $GLOBALS['phpgw_info']['server']; 
    58         $_SESSION['phpgw_info']['expressomail']['ldap_server'] = $ldap_manager ? $ldap_manager->srcs[1] : null; 
    59         $_SESSION['phpgw_info']['expressomail']['user']['email'] = $GLOBALS['phpgw']->preferences->values['email']; 
    60          
    61         $preferences = $GLOBALS['phpgw']->preferences->read(); 
    62         $_SESSION['phpgw_info']['user']['preferences']['expressoMail'] = $preferences['expressoMail']; 
    63         $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['voip_enabled'] = $voip_enabled; 
    64         $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['voip_email_redirect'] = $emailVoip; 
    65         $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['outoffice'] = $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['outoffice']; 
    66         $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['telephone_number'] = $GLOBALS['phpgw_info']['user']['telephonenumber']; 
    67         $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['use_cache'] = $current_config['expressoMail_enable_cache']; 
    68         $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['number_of_contacts'] = $current_config['expressoMail_Number_of_dynamic_contacts'] ? $current_config['expressoMail_Number_of_dynamic_contacts'] : "0"; 
    69         $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['notification_domains'] = $current_config['expressoMail_notification_domains']; 
    70         $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['googlegears_url'] = $current_config['expressoMail_googlegears_url'];     
    71     $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['use_assinar_criptografar'] = $GLOBALS['phpgw_info']['server']['use_assinar_criptografar'] ?  $GLOBALS['phpgw_info']['server']['use_assinar_criptografar'] : "0"; 
    72     $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['use_signature_digital_cripto'] = $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['use_signature_digital_cripto'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['use_signature_digital_cripto'] : "0"; 
    73     $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['use_signature_digital'] = $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['use_signature_digital'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['use_signature_digital'] : "0"; 
    74     $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['search_result_number'] = $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['search_result_number'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['search_result_number'] : "50"; 
    75     $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['search_characters_number'] = $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['search_characters_number'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['search_characters_number'] : "4"; 
    76     $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['num_max_certs_to_cipher'] = $GLOBALS['phpgw_info']['server']['num_max_certs_to_cipher'] ?  $GLOBALS['phpgw_info']['server']['num_max_certs_to_cipher'] : "10"; 
    77     $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['use_signature_cripto'] = $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['use_signature_cripto'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['use_signature_cripto'] : "0"; 
    78         $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['keep_after_auto_archiving'] = $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['keep_after_auto_archiving'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['keep_after_auto_archiving'] : "0"; 
    79         $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['max_attachment_size'] = $current_config['expressoMail_Max_attachment_size'] ? $current_config['expressoMail_Max_attachment_size']."M" : ini_get('upload_max_filesize');  
    80         $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['max_email_per_page'] = $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['max_email_per_page'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['max_email_per_page'] : "50"; 
    81  
    82         $template = CreateObject('phpgwapi.Template',PHPGW_APP_TPL); 
    83         $template->set_var("txt_loading",lang("Loading")); 
    84         $template->set_var("txt_clear_trash",lang("message(s) deleted from your trash folder.")); 
    85     $template->set_var("new_message", lang("New Message")); 
    86         $template->set_var("lang_inbox", lang("Inbox")); 
    87     $template->set_var("refresh", lang("Refresh")); 
    88     $template->set_var("tools", lang("Tools"));  
    89         $template->set_var("lang_Open_Search_Window", lang("Open search window") . '...'); 
    90         $template->set_var("lang_search_user", lang("Search user") . '...');  
    91         $template->set_var("upload_max_filesize",ini_get('upload_max_filesize')); 
    92         $template->set_var("msg_folder",$_GET['msgball']['folder']); 
    93         $template->set_var("msg_number",$_GET['msgball']['msgnum'] ? $_GET['msgball']['msgnum'] : $_GET['to']); 
    94         $template->set_var("user_email",$_SESSION['phpgw_info']['expressomail']['user']['email']); 
    95  
    96         $acc = CreateObject('phpgwapi.accounts'); 
    97  
    98         $template->set_var("user_organization", $acc->get_organization($GLOBALS['phpgw_info']['user']['account_dn'])); 
    99         $template->set_var("cyrus_delimiter",$_SESSION['phpgw_info']['expressomail']['email_server']['imapDelimiter']);  
    100  
    101         // Fix problem with cyrus delimiter changes in preferences. 
    102         // Dots in names: enabled/disabled. 
    103         $save_in_folder = @eregi_replace("INBOX/", "INBOX".$_SESSION['phpgw_info']['expressomail']['email_server']['imapDelimiter'], $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['save_in_folder']); 
    104         $save_in_folder = @eregi_replace("INBOX.", "INBOX".$_SESSION['phpgw_info']['expressomail']['email_server']['imapDelimiter'], $save_in_folder); 
    105         $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['save_in_folder'] = $save_in_folder; 
    106         // End Fix. 
    107          
    108         $template->set_file(Array('expressoMail' => 'index.tpl')); 
    109         $template->set_var( 'url', $GLOBALS[ 'phpgw' ] -> link( '/expressoMail1_2' ) ); 
    110         $template->set_block('expressoMail','list'); 
    111         $template->pfp('out','list'); 
    112  
    113         $GLOBALS['phpgw']->common->phpgw_footer(); 
    114  
    115     $_SESSION['phpgw_info']['server']['expressomail']['expressoMail_enable_log_messages'] = $current_config['expressoMail_enable_log_messages']; 
    116  
    117     // Begin Set Anti-Spam options. 
    118     $_SESSION['phpgw_info']['server']['expressomail']['expressoMail_command_for_ham'] = $current_config['expressoMail_command_for_ham']; 
    119     $_SESSION['phpgw_info']['server']['expressomail']['expressoMail_command_for_spam'] = $current_config['expressoMail_command_for_spam']; 
    120     $_SESSION['phpgw_info']['server']['expressomail']['expressoMail_use_spam_filter'] = $current_config['expressoMail_use_spam_filter'];    
    121     echo '<script> var use_spam_filter = "' . $current_config['expressoMail_use_spam_filter'] . '"</script>'; 
    122         // End Set Anti-Spam options. 
    123  
    124     // Set Imap Folder names options 
    125  
    126     $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultTrashFolder']   = $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultTrashFolder']     ? $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultTrashFolder']             : lang("Trash"); 
    127     $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultDraftsFolder']  = $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultDraftsFolder'] ? $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultDraftsFolder']       : lang("Drafts"); 
    128     $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultSpamFolder']    = $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultSpamFolder']      ? $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultSpamFolder']              : lang("Spam"); 
    129     $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultSentFolder']    = $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultSentFolder']      ? $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultSentFolder']              : lang("Sent"); 
    130  
    131     // gera paramero com tokens suportados .... 
    132     $var_tokens = ''; 
    133     for($ii = 1; $ii < 11; $ii++) 
    134     { 
    135         if($GLOBALS['phpgw_info']['server']['test_token' . $ii . '1']) 
    136             $var_tokens .= $GLOBALS['phpgw_info']['server']['test_token' . $ii . '1'] . ','; 
    137     } 
    138  
    139     if(!$var_tokens) 
    140     { 
    141         $var_tokens = 'ePass2000Lx;/usr/lib/libepsng_p11.so,ePass2000Win;c:/windows/system32/ngp11v211.dll'; 
    142     } 
    143  
    144  
    145         if ( ! @is_object($GLOBALS['phpgw']->js ) ) 
    146                 $GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript'); 
    147  
    148         $GLOBALS['phpgw']->js->validate_file( 'dJSWin', 'dJSWin' ); 
    149         $GLOBALS['phpgw']->js->validate_file( 'dftree', 'dftree' ); 
    150  
    151         $GLOBALS['phpgw']->js->validate_file( 'modal', 'modal', 'expressoMail1_2' ); 
    152         $GLOBALS['phpgw']->js->validate_file( 'jscalendar', 'calendar', 'expressoMail1_2' ); 
    153         $GLOBALS['phpgw']->js->validate_file( 'jscalendar', 'calendar-setup', 'expressoMail1_2' ); 
    154         $GLOBALS['phpgw']->js->validate_file( 'jscalendar', 'lang/calendar-br', 'expressoMail1_2' ); 
    155         $GLOBALS['phpgw']->js->validate_file( 'jscode', 'globals', 'expressoMail1_2' ); 
    156         $GLOBALS['phpgw']->js->validate_file( 'jscode', 'sniff_browser', 'expressoMail1_2' ); 
    157         $GLOBALS['phpgw']->js->validate_file( 'jscode', 'common_functions', 'expressoMail1_2' ); 
    158         $GLOBALS['phpgw']->js->validate_file( 'jscode', 'abas', 'expressoMail1_2' ); 
    159         $GLOBALS['phpgw']->js->validate_file( 'jscode', 'doiMenuData', 'expressoMail1_2' ); 
    160         $GLOBALS['phpgw']->js->validate_file( 'jscode', 'drag_area', 'expressoMail1_2' ); 
    161         $GLOBALS['phpgw']->js->validate_file( 'jscode', 'draw_api', 'expressoMail1_2' ); 
    162         $GLOBALS['phpgw']->js->validate_file( 'jscode', 'DropDownContacts', 'expressoMail1_2' ); 
    163         $GLOBALS['phpgw']->js->validate_file( 'jscode', 'InfoContact', 'expressoMail1_2' ); 
    164         $GLOBALS['phpgw']->js->validate_file( 'jscode', 'main', 'expressoMail1_2' ); 
    165         $GLOBALS['phpgw']->js->validate_file( 'jscode', 'local_messages', 'expressoMail1_2' ); 
    166         $GLOBALS['phpgw']->js->validate_file( 'jscode', 'messages_controller', 'expressoMail1_2' ); 
    167         $GLOBALS['phpgw']->js->validate_file( 'jscode', 'rich_text_editor', 'expressoMail1_2' ); 
    168         $GLOBALS['phpgw']->js->validate_file( 'jscode', 'wfolders', 'expressoMail1_2' ); 
    169  
    170         if ($GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['use_shortcuts']) 
    171                 $GLOBALS['phpgw']->js->validate_file( 'jscode', 'shortcut', 'expressoMail1_2' ); 
    172  
    173         if ($_SESSION['phpgw_info']['user']['preferences']['expressoMail']['use_local_messages']) 
    174                 $GLOBALS['phpgw']->js->validate_file( 'jscode', 'gears_init', 'expressoMail1_2' ); 
    175  
    176  
    177         $expressoMail_url = $GLOBALS[ 'phpgw' ] -> link( '/expressoMail1_2' ); 
    178         $phpgwapi_url = $GLOBALS[ 'phpgw' ] -> link( '/phpgwapi' ); 
    179  
    180         $script = '<link rel="stylesheet" type="text/css" href="' . $expressoMail_url . '/templates/' . $GLOBALS['phpgw_info']['server']['template_set'] . '/main.css">'; 
    181         $script .= '<link rel="stylesheet" type="text/css" href="' . $phpgwapi_url . '/js/dftree/dftree.css">'; 
    182         $script .= '<style type="text/css">@import url(' . $phpgwapi_url . '/js/jscalendar/calendar-win2k-1.css);</style>'; 
    183         $script .= '<script type="text/javascript">var template = "' . $GLOBALS['phpgw_info']['server']['template_set'] . '";'; 
    184         $script .= 'var special_folders = new Array(4);'; 
    185         $script .= 'special_folders["'.$_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultTrashFolder'].'"] = \'Trash\';'; 
    186         $script .= 'special_folders["'.$_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultDraftsFolder'].'"] = \'Drafts\';'; 
    187         $script .= 'special_folders["'.$_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultSpamFolder'].'"] = \'Spam\';'; 
    188         $script .= 'special_folders["'.$_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultSentFolder'].'"] = \'Sent\';'; 
    189         $script .= 'var trashfolder = "'.$_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultTrashFolder'].'";'; 
    190         $script .= 'var draftsfolder = "'.$_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultDraftsFolder'].'";'; 
    191         $script .= 'var sentfolder = "'.$_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultSentFolder'].'";'; 
    192         $script .= 'var spamfolder = "'.$_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultSpamFolder'].'";'; 
    193         $script .= 'var token_param = "'.$var_tokens.'";'; 
    194         $script .= 'var locale = "'.$GLOBALS['phpgw']->common->getPreferredLanguage().'";'; 
    195         $script .= 'var account_id = ' . $GLOBALS['phpgw_info']['user']['account_id'] . ';var expresso_offline = false;</script>'; 
    196         $script .= '</script>'; 
    197  
    198         $update_version = $GLOBALS['phpgw_info']['flags']['update_version']; 
    199  
    200         echo $script 
    201                 . $GLOBALS[ 'phpgw' ] -> common -> get_java_script( ) 
    202                 . '<script language="Javascript">expresso.connector.updateVersion = "'. $update_version . '";init();</script>'; 
    203  
    204         // Get Preferences or redirect to preferences page. 
    205         $GLOBALS['phpgw']->preferences->read_repository(); 
    206         //print_r($_SESSION['phpgw_info']['user']['preferences']['expressoMail']); 
     57$_SESSION['phpgw_info']['expressomail']['max_folders_to_show'] = $current_config['expressoMail_Max_folders_to_show'] ? $current_config['expressoMail_Max_folders_to_show'] : "200"; 
     58$_SESSION['phpgw_info']['expressomail']['server'] = $GLOBALS['phpgw_info']['server']; 
     59$_SESSION['phpgw_info']['expressomail']['ldap_server'] = $ldap_manager ? $ldap_manager->srcs[1] : null; 
     60$_SESSION['phpgw_info']['expressomail']['user']['email'] = $GLOBALS['phpgw']->preferences->values['email']; 
     61 
     62$preferences = $GLOBALS['phpgw']->preferences->read(); 
     63$_SESSION['phpgw_info']['user']['preferences']['expressoMail'] = $preferences['expressoMail']; 
     64$_SESSION['phpgw_info']['user']['preferences']['expressoMail']['voip_enabled'] = $voip_enabled; 
     65$_SESSION['phpgw_info']['user']['preferences']['expressoMail']['voip_email_redirect'] = $emailVoip; 
     66$_SESSION['phpgw_info']['user']['preferences']['expressoMail']['outoffice'] = $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['outoffice']; 
     67$_SESSION['phpgw_info']['user']['preferences']['expressoMail']['telephone_number'] = $GLOBALS['phpgw_info']['user']['telephonenumber']; 
     68$_SESSION['phpgw_info']['user']['preferences']['expressoMail']['use_cache'] = $current_config['expressoMail_enable_cache']; 
     69$_SESSION['phpgw_info']['user']['preferences']['expressoMail']['number_of_contacts'] = $current_config['expressoMail_Number_of_dynamic_contacts'] ? $current_config['expressoMail_Number_of_dynamic_contacts'] : "0"; 
     70$_SESSION['phpgw_info']['user']['preferences']['expressoMail']['notification_domains'] = $current_config['expressoMail_notification_domains']; 
     71$_SESSION['phpgw_info']['user']['preferences']['expressoMail']['googlegears_url'] = $current_config['expressoMail_googlegears_url']; 
     72$_SESSION['phpgw_info']['user']['preferences']['expressoMail']['use_assinar_criptografar'] = $GLOBALS['phpgw_info']['server']['use_assinar_criptografar'] ?  $GLOBALS['phpgw_info']['server']['use_assinar_criptografar'] : "0"; 
     73$_SESSION['phpgw_info']['user']['preferences']['expressoMail']['use_signature_digital_cripto'] = $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['use_signature_digital_cripto'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['use_signature_digital_cripto'] : "0"; 
     74$_SESSION['phpgw_info']['user']['preferences']['expressoMail']['use_signature_digital'] = $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['use_signature_digital'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['use_signature_digital'] : "0"; 
     75$_SESSION['phpgw_info']['user']['preferences']['expressoMail']['search_result_number'] = $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['search_result_number'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['search_result_number'] : "50"; 
     76$_SESSION['phpgw_info']['user']['preferences']['expressoMail']['search_characters_number'] = $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['search_characters_number'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['search_characters_number'] : "4"; 
     77$_SESSION['phpgw_info']['user']['preferences']['expressoMail']['num_max_certs_to_cipher'] = $GLOBALS['phpgw_info']['server']['num_max_certs_to_cipher'] ?  $GLOBALS['phpgw_info']['server']['num_max_certs_to_cipher'] : "10"; 
     78$_SESSION['phpgw_info']['user']['preferences']['expressoMail']['use_signature_cripto'] = $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['use_signature_cripto'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['use_signature_cripto'] : "0"; 
     79$_SESSION['phpgw_info']['user']['preferences']['expressoMail']['keep_after_auto_archiving'] = $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['keep_after_auto_archiving'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['keep_after_auto_archiving'] : "0"; 
     80$_SESSION['phpgw_info']['user']['preferences']['expressoMail']['max_attachment_size'] = $current_config['expressoMail_Max_attachment_size'] ? $current_config['expressoMail_Max_attachment_size']."M" : ini_get('upload_max_filesize'); 
     81$_SESSION['phpgw_info']['user']['preferences']['expressoMail']['max_email_per_page'] = $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['max_email_per_page'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['max_email_per_page'] : "50"; 
     82 
     83$template = CreateObject('phpgwapi.Template',PHPGW_APP_TPL); 
     84$template->set_var("txt_loading",lang("Loading")); 
     85$template->set_var("txt_clear_trash",lang("message(s) deleted from your trash folder.")); 
     86$template->set_var("new_message", lang("New Message")); 
     87$template->set_var("lang_inbox", lang("Inbox")); 
     88$template->set_var("refresh", lang("Refresh")); 
     89$template->set_var("tools", lang("Tools")); 
     90$template->set_var("lang_Open_Search_Window", lang("Open search window") . '...'); 
     91$template->set_var("lang_search_user", lang("Search user") . '...'); 
     92$template->set_var("upload_max_filesize",ini_get('upload_max_filesize')); 
     93$template->set_var("msg_folder",$_GET['msgball']['folder']); 
     94$template->set_var("msg_number",$_GET['msgball']['msgnum'] ? $_GET['msgball']['msgnum'] : $_GET['to']); 
     95$template->set_var("user_email",$_SESSION['phpgw_info']['expressomail']['user']['email']); 
     96 
     97$acc = CreateObject('phpgwapi.accounts'); 
     98 
     99$template->set_var("user_organization", $acc->get_organization($GLOBALS['phpgw_info']['user']['account_dn'])); 
     100$template->set_var("cyrus_delimiter",$_SESSION['phpgw_info']['expressomail']['email_server']['imapDelimiter']); 
     101 
     102// Fix problem with cyrus delimiter changes in preferences. 
     103// Dots in names: enabled/disabled. 
     104$save_in_folder = @eregi_replace("INBOX/", "INBOX".$_SESSION['phpgw_info']['expressomail']['email_server']['imapDelimiter'], $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['save_in_folder']); 
     105$save_in_folder = @eregi_replace("INBOX.", "INBOX".$_SESSION['phpgw_info']['expressomail']['email_server']['imapDelimiter'], $save_in_folder); 
     106$_SESSION['phpgw_info']['user']['preferences']['expressoMail']['save_in_folder'] = $save_in_folder; 
     107// End Fix. 
     108 
     109$template->set_file(Array('expressoMail' => 'index.tpl')); 
     110$template->set_var( 'url', $GLOBALS[ 'phpgw' ] -> link( '/expressoMail1_2' ) ); 
     111$template->set_block('expressoMail','list'); 
     112$template->pfp('out','list'); 
     113 
     114$GLOBALS['phpgw']->common->phpgw_footer(); 
     115 
     116$_SESSION['phpgw_info']['server']['expressomail']['expressoMail_enable_log_messages'] = $current_config['expressoMail_enable_log_messages']; 
     117 
     118// Begin Set Anti-Spam options. 
     119$_SESSION['phpgw_info']['server']['expressomail']['expressoMail_command_for_ham'] = $current_config['expressoMail_command_for_ham']; 
     120$_SESSION['phpgw_info']['server']['expressomail']['expressoMail_command_for_spam'] = $current_config['expressoMail_command_for_spam']; 
     121$_SESSION['phpgw_info']['server']['expressomail']['expressoMail_use_spam_filter'] = $current_config['expressoMail_use_spam_filter']; 
     122echo '<script> var use_spam_filter = "' . $current_config['expressoMail_use_spam_filter'] . '"</script>'; 
     123// End Set Anti-Spam options. 
     124 
     125// Set Imap Folder names options 
     126$_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultTrashFolder']       = $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultTrashFolder']     ? $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultTrashFolder']             : lang("Trash"); 
     127$_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultDraftsFolder']      = $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultDraftsFolder'] ? $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultDraftsFolder']       : lang("Drafts"); 
     128$_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultSpamFolder']        = $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultSpamFolder']      ? $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultSpamFolder']              : lang("Spam"); 
     129$_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultSentFolder']        = $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultSentFolder']      ? $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultSentFolder']              : lang("Sent"); 
     130 
     131// gera paramero com tokens suportados .... 
     132$var_tokens = ''; 
     133for($ii = 1; $ii < 11; $ii++) 
     134{ 
     135        if($GLOBALS['phpgw_info']['server']['test_token' . $ii . '1']) 
     136                $var_tokens .= $GLOBALS['phpgw_info']['server']['test_token' . $ii . '1'] . ','; 
     137} 
     138 
     139if(!$var_tokens) 
     140{ 
     141        $var_tokens = 'ePass2000Lx;/usr/lib/libepsng_p11.so,ePass2000Win;c:/windows/system32/ngp11v211.dll'; 
     142} 
     143 
     144 
     145if ( ! @is_object($GLOBALS['phpgw']->js ) ) 
     146        $GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript'); 
     147 
     148$GLOBALS['phpgw']->js->validate_file( 'dJSWin', 'dJSWin' ); 
     149$GLOBALS['phpgw']->js->validate_file( 'dftree', 'dftree' ); 
     150 
     151$GLOBALS['phpgw']->js->validate_file( 'modal', 'modal', 'expressoMail1_2' ); 
     152$GLOBALS['phpgw']->js->validate_file( 'jscalendar', 'calendar', 'expressoMail1_2' ); 
     153$GLOBALS['phpgw']->js->validate_file( 'jscalendar', 'calendar-setup', 'expressoMail1_2' ); 
     154$GLOBALS['phpgw']->js->validate_file( 'jscalendar', 'lang/calendar-br', 'expressoMail1_2' ); 
     155$GLOBALS['phpgw']->js->validate_file( 'jscode', 'globals', 'expressoMail1_2' ); 
     156$GLOBALS['phpgw']->js->validate_file( 'jscode', 'sniff_browser', 'expressoMail1_2' ); 
     157$GLOBALS['phpgw']->js->validate_file( 'jscode', 'common_functions', 'expressoMail1_2' ); 
     158$GLOBALS['phpgw']->js->validate_file( 'jscode', 'abas', 'expressoMail1_2' ); 
     159$GLOBALS['phpgw']->js->validate_file( 'jscode', 'doiMenuData', 'expressoMail1_2' ); 
     160$GLOBALS['phpgw']->js->validate_file( 'jscode', 'drag_area', 'expressoMail1_2' ); 
     161$GLOBALS['phpgw']->js->validate_file( 'jscode', 'draw_api', 'expressoMail1_2' ); 
     162$GLOBALS['phpgw']->js->validate_file( 'jscode', 'DropDownContacts', 'expressoMail1_2' ); 
     163$GLOBALS['phpgw']->js->validate_file( 'jscode', 'InfoContact', 'expressoMail1_2' ); 
     164$GLOBALS['phpgw']->js->validate_file( 'jscode', 'main', 'expressoMail1_2' ); 
     165$GLOBALS['phpgw']->js->validate_file( 'jscode', 'local_messages', 'expressoMail1_2' ); 
     166$GLOBALS['phpgw']->js->validate_file( 'jscode', 'messages_controller', 'expressoMail1_2' ); 
     167$GLOBALS['phpgw']->js->validate_file( 'jscode', 'rich_text_editor', 'expressoMail1_2' ); 
     168$GLOBALS['phpgw']->js->validate_file( 'jscode', 'wfolders', 'expressoMail1_2' ); 
     169 
     170if ($GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['use_shortcuts']) 
     171        $GLOBALS['phpgw']->js->validate_file( 'jscode', 'shortcut', 'expressoMail1_2' ); 
     172 
     173if ($_SESSION['phpgw_info']['user']['preferences']['expressoMail']['use_local_messages']) 
     174        $GLOBALS['phpgw']->js->validate_file( 'jscode', 'gears_init', 'expressoMail1_2' ); 
     175 
     176 
     177$expressoMail_url = $GLOBALS[ 'phpgw' ] -> link( '/expressoMail1_2' ); 
     178$phpgwapi_url = $GLOBALS[ 'phpgw' ] -> link( '/phpgwapi' ); 
     179 
     180$script = '<link rel="stylesheet" type="text/css" href="' . $expressoMail_url . '/templates/' . $GLOBALS['phpgw_info']['server']['template_set'] . '/main.css">'; 
     181$script .= '<link rel="stylesheet" type="text/css" href="' . $phpgwapi_url . '/js/dftree/dftree.css">'; 
     182$script .= '<style type="text/css">@import url(' . $phpgwapi_url . '/js/jscalendar/calendar-win2k-1.css);</style>'; 
     183$script .= '<script type="text/javascript">var template = "' . $GLOBALS['phpgw_info']['server']['template_set'] . '";'; 
     184$script .= 'var special_folders = new Array(4);'; 
     185$script .= 'special_folders["'.$_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultTrashFolder'].'"] = \'Trash\';'; 
     186$script .= 'special_folders["'.$_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultDraftsFolder'].'"] = \'Drafts\';'; 
     187$script .= 'special_folders["'.$_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultSpamFolder'].'"] = \'Spam\';'; 
     188$script .= 'special_folders["'.$_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultSentFolder'].'"] = \'Sent\';'; 
     189$script .= 'var trashfolder = "'.$_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultTrashFolder'].'";'; 
     190$script .= 'var draftsfolder = "'.$_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultDraftsFolder'].'";'; 
     191$script .= 'var sentfolder = "'.$_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultSentFolder'].'";'; 
     192$script .= 'var spamfolder = "'.$_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultSpamFolder'].'";'; 
     193$script .= 'var token_param = "'.$var_tokens.'";'; 
     194$script .= 'var locale = "'.$GLOBALS['phpgw']->common->getPreferredLanguage().'";'; 
     195$script .= 'var account_id = ' . $GLOBALS['phpgw_info']['user']['account_id'] . ';var expresso_offline = false;</script>'; 
     196$script .= '</script>'; 
     197 
     198$update_version = $GLOBALS['phpgw_info']['flags']['update_version']; 
     199 
     200echo $script 
     201        . $GLOBALS[ 'phpgw' ] -> common -> get_java_script( ) 
     202        . '<script language="Javascript">expresso.connector.updateVersion = "'. $update_version . '";init();</script>'; 
    207203?> 
    208204<!-----Expresso Mail - Version Updated:<?=$update_version?>--------> 
  • trunk/expressoMail1_2/js/jscode/drag_area.js

    r2521 r2529  
    160160document.onmousemove = function(e) { 
    161161        var     _target = is_ie ? window.event.srcElement : e.target; 
    162         if(_dragArea._mousemove) 
     162        /*if(_dragArea._mousemove) 
    163163                _dragArea._mousemove(e); 
    164164         
    165         else if(_dragArea.msg_number && _target.type != 'checkbox') { 
     165        else*/ if(_dragArea.msg_number && _target.type != 'checkbox') { 
    166166                _dragArea.mouseMoveDrag(e); 
    167167        } 
  • trunk/phpgwapi/templates/default/navbar.inc.php

    r2519 r2529  
    11<?php 
    2         /**************************************************************************\ 
    3         * phpGroupWare                                                             * 
    4         * http://www.phpgroupware.org                                              * 
    5         * --------------------------------------------                             * 
    6         *  This program is free software; you can redistribute it and/or modify it * 
    7         *  under the terms of the GNU General Public License as published by the   * 
    8         *  Free Software Foundation; either version 2 of the License, or (at your  * 
    9         *  option) any later version.                                              * 
    10         \**************************************************************************/ 
    11  
    12  
    13         function parse_navbar($force = False) 
    14         { 
    15                 $GLOBALS['celepar_tpl'] = createobject('phpgwapi.Template',PHPGW_TEMPLATE_DIR); 
    16  
    17                 $GLOBALS['celepar_tpl']->set_file( 
    18                         array( 
    19                                 'navbar' => 'navbar.tpl' 
    20                         ) 
    21                 ); 
    22  
    23                 $GLOBALS['celepar_tpl']->set_block('navbar','navbar_header','navbar_header'); 
    24                 $GLOBALS['celepar_tpl']->set_block('navbar','extra_blocks_header','extra_block_header'); 
    25                 $GLOBALS['celepar_tpl']->set_block('navbar','extra_block_row','extra_block_row'); 
    26                 $GLOBALS['celepar_tpl']->set_block('navbar','extra_block_spacer','extra_block_spacer'); 
    27                 $GLOBALS['celepar_tpl']->set_block('navbar','extra_blocks_footer','extra_blocks_footer'); 
    28                 $GLOBALS['celepar_tpl']->set_block('navbar','sidebox_hide_header','sidebox_hide_header'); 
    29                 $GLOBALS['celepar_tpl']->set_block('navbar','sidebox_hide_footer','sidebox_hide_footer'); 
    30                 $GLOBALS['celepar_tpl']->set_block('navbar','appbox','appbox'); 
    31                 $GLOBALS['celepar_tpl']->set_block('navbar','navbar_footer','navbar_footer'); 
    32                  
    33                 $GLOBALS['celepar_tpl']->set_var('my_preferences', lang("My Preferences")); 
    34                 $GLOBALS['celepar_tpl']->set_var('title_my_preferences', lang("Click here to change your Expresso password and other preferences")); 
    35                 $GLOBALS['celepar_tpl']->set_var('title_suggestions', lang("Send your critics, doubts or suggestions")); 
    36                 $GLOBALS['celepar_tpl']->set_var('suggestions', lang("Suggestions")); 
    37                 $GLOBALS['celepar_tpl']->set_var('help', lang("Help")); 
    38                 $GLOBALS['celepar_tpl']->set_var('title_help', lang("Click here for help")); 
    39                 $GLOBALS['celepar_tpl']->set_var('template',$GLOBALS['phpgw_info']['server']['template_set']); 
    40  
    41                 $var['img_root'] = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/'.$GLOBALS['phpgw_info']['server']['template_set'].'/images'; 
    42                 $var['dir_root'] = $GLOBALS['phpgw_info']['server']['webserver_url']; 
    43                 $var['table_bg_color'] = $GLOBALS['phpgw_info']['theme']['navbar_bg']; 
    44  
    45                 if($GLOBALS['phpgw_info']['user']['preferences']['common']['click_or_onmouseover']=='onmouseover') 
     2/**************************************************************************\ 
     3* phpGroupWare                                                             * 
     4* http://www.phpgroupware.org                                              * 
     5* --------------------------------------------                             * 
     6*  This program is free software; you can redistribute it and/or modify it * 
     7*  under the terms of the GNU General Public License as published by the   * 
     8*  Free Software Foundation; either version 2 of the License, or (at your  * 
     9*  option) any later version.                                              * 
     10\**************************************************************************/ 
     11 
     12 
     13function parse_navbar($force = False) 
     14{ 
     15        $GLOBALS['celepar_tpl'] = createobject('phpgwapi.Template',PHPGW_TEMPLATE_DIR); 
     16 
     17        $GLOBALS['celepar_tpl']->set_file( 
     18                array( 
     19                        'navbar' => 'navbar.tpl' 
     20                ) 
     21        ); 
     22 
     23        $GLOBALS['celepar_tpl']->set_block('navbar','navbar_header','navbar_header'); 
     24        $GLOBALS['celepar_tpl']->set_block('navbar','extra_blocks_header','extra_block_header'); 
     25        $GLOBALS['celepar_tpl']->set_block('navbar','extra_block_row','extra_block_row'); 
     26        $GLOBALS['celepar_tpl']->set_block('navbar','extra_block_spacer','extra_block_spacer'); 
     27        $GLOBALS['celepar_tpl']->set_block('navbar','extra_blocks_footer','extra_blocks_footer'); 
     28        $GLOBALS['celepar_tpl']->set_block('navbar','sidebox_hide_header','sidebox_hide_header'); 
     29        $GLOBALS['celepar_tpl']->set_block('navbar','sidebox_hide_footer','sidebox_hide_footer'); 
     30        $GLOBALS['celepar_tpl']->set_block('navbar','appbox','appbox'); 
     31        $GLOBALS['celepar_tpl']->set_block('navbar','navbar_footer','navbar_footer'); 
     32 
     33        $GLOBALS['celepar_tpl']->set_var('my_preferences', lang("My Preferences")); 
     34        $GLOBALS['celepar_tpl']->set_var('title_my_preferences', lang("Click here to change your Expresso password and other preferences")); 
     35        $GLOBALS['celepar_tpl']->set_var('title_suggestions', lang("Send your critics, doubts or suggestions")); 
     36        $GLOBALS['celepar_tpl']->set_var('suggestions', lang("Suggestions")); 
     37        $GLOBALS['celepar_tpl']->set_var('help', lang("Help")); 
     38        $GLOBALS['celepar_tpl']->set_var('title_help', lang("Click here for help")); 
     39        $GLOBALS['celepar_tpl']->set_var('template',$GLOBALS['phpgw_info']['server']['template_set']); 
     40 
     41        $var['img_root'] = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/'.$GLOBALS['phpgw_info']['server']['template_set'].'/images'; 
     42        $var['dir_root'] = $GLOBALS['phpgw_info']['server']['webserver_url']; 
     43        $var['table_bg_color'] = $GLOBALS['phpgw_info']['theme']['navbar_bg']; 
     44 
     45        if($GLOBALS['phpgw_info']['user']['preferences']['common']['click_or_onmouseover']=='onmouseover') 
     46        { 
     47                $show_menu_event = 'onMouseOver'; 
     48        } 
     49        else 
     50        { 
     51                $show_menu_event = 'onClick'; 
     52        } 
     53 
     54 
     55        $applications = ''; 
     56 
     57        //      == 'icons_and_text') 
     58 
     59        $max_icons=$GLOBALS['phpgw_info']['user']['preferences']['common']['max_icons']; 
     60 
     61        if(!$max_icons) 
     62        { 
     63                $max_icons=200; 
     64        } 
     65 
     66        $i = 0; 
     67        foreach($GLOBALS['phpgw_info']['navbar'] as $app => $app_data) 
     68        { 
     69                $current_app = False; 
     70                if($app != 'preferences' && $app != 'about' && $app != 'logout') 
    4671                { 
    47                         $show_menu_event = 'onMouseOver'; 
     72                        $icon = '<a href="'.$app_data['url'].'" cacheit="' 
     73                                . ( ( $app == 'admin' || $app == 'expressoAdmin1_2' || $app == 'expressoMail1_2' || $app == 'contactcenter' || $app == 'jabberit_messenger' || $app == 'filemanager'  ) ? 'true' : 'false') 
     74                                . '">'; 
     75                        $title = $GLOBALS['phpgw_info']['apps'][$app]['title']; 
     76                        if($app == 'home') $title = lang('Home'); 
     77 
     78                        if ($GLOBALS['phpgw_info']['flags']['currentapp'] == $app) 
     79                        { 
     80                                $current_app = True; 
     81                                echo '<script>var curr_app = "' . str_replace('_','',$app) . 'id";</script>'; 
     82                        } 
     83 
     84                        $icon .= '<img id="'.str_replace('_','',$app).'id" src="' . $app_data['icon'] . '" alt="' . $title . '" title="'. $title 
     85                                . '" border="0" width="'.($current_app ? 35 : 24 ).'" height="'.($current_app ? 35 : 24 ).'" nowrap="nowrap"/></a>'; 
     86 
     87                        if($app=='home') 
     88                        { 
     89                                if($GLOBALS['phpgw_info']['user']['preferences']['common']['start_and_logout_icons']=='no') 
     90                                { 
     91                                        continue; 
     92                                } 
     93                        } 
     94 
     95                        // Verifica qual o formato da Barra de navegação:  
     96                        // Icone ou Texto, ou Icone e Texto 
     97 
     98 
     99                        if($GLOBALS['phpgw_info']['user']['preferences']['common']['navbar_format']=='icons') { 
     100                                $title_extra = $title; 
     101                                $title = ''; 
     102                        } 
     103                        else if($GLOBALS['phpgw_info']['user']['preferences']['common']['navbar_format']=='text'){ 
     104                                $icon = ''; 
     105                        } 
     106 
     107                        if($i< $max_icons) { 
     108 
     109                                if($GLOBALS['phpgw_info']['user']['preferences']['common']['start_and_logout_icons']=='no') 
     110                                { 
     111                                        $tdwidth = 100/($max_icons); 
     112                                } 
     113                                else 
     114                                { 
     115                                        $tdwidth = 100/($max_icons+2); 
     116                                } 
     117 
     118                                $app_icons .= '<td nowrap' 
     119                                        . ' onmouseover="if ( this.className != \'navbar_butOut\'){this.className=\'navbar_butOver\'; zoom_in(this.firstChild.firstChild.id);}"' 
     120                                        . ' onmouseout="if ( this.className != \'navbar_butOut\'){this.className=\'navbar_but\'; zoom_out(this.firstChild.firstChild.id);}"' 
     121                                        . ' onclick="if ( this.className != \'navbar_butOut\'){this.className=\'navbar_butOut\'; zoom_out(curr_app);' 
     122                                        . 'document.getElementById(curr_app).parentNode.parentNode.className=\'navbar_but\';curr_app=\'' . str_replace('_','',$app) . 'id\'}"' 
     123                                        . ' class="navbar_but'.($current_app?'Out':'').'">'; 
     124 
     125                                if(isset($GLOBALS['phpgw_info']['flags']['navbar_target']) && $GLOBALS['phpgw_info']['flags']['navbar_target']) 
     126                                { 
     127                                        $app_icons .= ' target="' . $GLOBALS['phpgw_info']['flags']['navbar_target'] . '"'; 
     128                                }                                                
     129                                $app_icons .=  $icon; 
     130                        } 
     131 
     132 
     133                        $icon = '<img align="center" src="' . $app_data['icon'] . '" alt="' . $title . '" width="16" title="'. $title . '" border="0" />'; 
     134 
     135                        $app_extra_icons .= '<tr>'; 
     136 
     137                        if($GLOBALS['phpgw_info']['user']['preferences']['common']['navbar_format']!='text') 
     138                        { 
     139                                $app_extra_icons .= '<td class="extraIconsRow"><a href="' . $app_data['url'] . '"'; 
     140 
     141                                if(isset($GLOBALS['phpgw_info']['flags']['navbar_target']) && $GLOBALS['phpgw_info']['flags']['navbar_target']) 
     142                                { 
     143                                        $app_extra_icons .= ' target="' . $GLOBALS['phpgw_info']['flags']['navbar_target'] . '"'; 
     144                                } 
     145 
     146                                $app_extra_icons .= ' >' . $icon . '</a></td>'; 
     147                        } 
     148 
     149 
     150                        $app_extra_icons .= '<td align="left" class="extraIconsRow" style=""><a href="'.$app_data['url'] . '"'; 
     151 
     152                        if(isset($GLOBALS['phpgw_info']['flags']['navbar_target']) && $GLOBALS['phpgw_info']['flags']['navbar_target']) 
     153                        { 
     154                                $app_extra_icons .= ' target="' . $GLOBALS['phpgw_info']['flags']['navbar_target'] . '"'; 
     155                        } 
     156 
     157                        $app_extra_icons .= '>' . $title_extra . '</a></td></tr>'; 
     158 
     159                        unset($icon); 
     160                        unset($title); 
     161                        $i++;                            
    48162                } 
    49                 else 
    50                 { 
    51                         $show_menu_event = 'onClick'; 
     163        } 
     164 
     165        if($GLOBALS['phpgw_info']['user']['preferences']['common']['start_and_logout_icons']!='no')      
     166        { 
     167 
     168                $hint = $GLOBALS['phpgw_info']['navbar']['logout']['title']; 
     169                $icon = '<img id="logout_id" width="24" height="24" src="'.$GLOBALS['phpgw_info']['navbar']['logout']['icon'].'"  alt="'.$hint.'" title="'.$hint.'">'; 
     170 
     171                if($GLOBALS['phpgw_info']['user']['preferences']['common']['navbar_format']=='icons') { 
     172 
     173                        $title = ''; 
    52174                } 
    53  
    54  
    55                 $applications = ''; 
    56  
    57                 //      == 'icons_and_text') 
    58  
    59                 $max_icons=$GLOBALS['phpgw_info']['user']['preferences']['common']['max_icons']; 
    60                   
    61                 if(!$max_icons) 
    62                 { 
    63                         $max_icons=200; 
    64                 } 
    65                  
    66                 $i = 0; 
    67                 foreach($GLOBALS['phpgw_info']['navbar'] as $app => $app_data) 
    68                 { 
    69                         $current_app = False; 
    70                                 if($app != 'preferences' && $app != 'about' && $app != 'logout') 
    71                                 { 
    72                                         $icon = '<a href="'.$app_data['url'].'" cacheit="'.( ( $app == 'admin' || $app == 'expressoAdmin1_2' || $app == 'expressoMail1_2' ) ? 'true' : 'false').'">'; 
    73                                         $title = $GLOBALS['phpgw_info']['apps'][$app]['title']; 
    74                                         if($app == 'home') $title = lang('Home'); 
    75  
    76                                         if ($GLOBALS['phpgw_info']['flags']['currentapp'] == $app) 
    77                                         { 
    78                                                 $current_app = True; 
    79                                                 echo '<script>var curr_app = "' . str_replace('_','',$app) . 'id";</script>'; 
    80                                         } 
    81  
    82                                         $icon .= '<img id="'.str_replace('_','',$app).'id" src="' . $app_data['icon'] . '" alt="' . $title . '" title="'. $title 
    83                                                 . '" border="0" width="'.($current_app ? 35 : 24 ).'" height="'.($current_app ? 35 : 24 ).'" nowrap="nowrap"/></a>'; 
    84  
    85                                         if($app=='home') 
    86                                         { 
    87                                                 if($GLOBALS['phpgw_info']['user']['preferences']['common']['start_and_logout_icons']=='no') 
    88                                                 { 
    89                                                         continue; 
    90                                                 } 
    91                                         } 
    92                                  
    93                                         // Verifica qual o formato da Barra de navegação:  
    94                                         // Icone ou Texto, ou Icone e Texto 
    95                                          
    96  
    97                                         if($GLOBALS['phpgw_info']['user']['preferences']['common']['navbar_format']=='icons') { 
    98                                                 $title_extra = $title; 
    99                                                 $title = ''; 
    100                                         } 
    101                                         else if($GLOBALS['phpgw_info']['user']['preferences']['common']['navbar_format']=='text'){ 
    102                                                 $icon = ''; 
    103                                         } 
    104  
    105                                         if($i< $max_icons) { 
    106  
    107                                                 if($GLOBALS['phpgw_info']['user']['preferences']['common']['start_and_logout_icons']=='no') 
    108                                                 { 
    109                                                         $tdwidth = 100/($max_icons); 
    110                                                 } 
    111                                                 else 
    112                                                 { 
    113                                                         $tdwidth = 100/($max_icons+2); 
    114                                                 } 
    115                                                  
    116                                                 $app_icons .= '<td nowrap' 
    117                                                 . ' onmouseover="if ( this.className != \'navbar_butOut\'){this.className=\'navbar_butOver\'; zoom_in(this.firstChild.firstChild.id);}"' 
    118                                                 . ' onmouseout="if ( this.className != \'navbar_butOut\'){this.className=\'navbar_but\'; zoom_out(this.firstChild.firstChild.id);}"' 
    119                                                 . ' onclick="if ( this.className != \'navbar_butOut\'){this.className=\'navbar_butOut\'; zoom_out(curr_app);' 
    120                                                 . 'document.getElementById(curr_app).parentNode.parentNode.className=\'navbar_but\';curr_app=\'' . str_replace('_','',$app) . 'id\'}"' 
    121                                                 . ' class="navbar_but'.($current_app?'Out':'').'">'; 
    122  
    123                                                 if(isset($GLOBALS['phpgw_info']['flags']['navbar_target']) && $GLOBALS['phpgw_info']['flags']['navbar_target']) 
    124                                                 { 
    125                                                         $app_icons .= ' target="' . $GLOBALS['phpgw_info']['flags']['navbar_target'] . '"'; 
    126                                                 }                                                
    127                                                 $app_icons .=  $icon; 
    128                                         } 
    129                                          
    130                                                                                  
    131                                         $icon = '<img align="center" src="' . $app_data['icon'] . '" alt="' . $title . '" width="16" title="'. $title . '" border="0" />'; 
    132                                  
    133                                         $app_extra_icons .= '<tr>'; 
    134  
    135                                         if($GLOBALS['phpgw_info']['user']['preferences']['common']['navbar_format']!='text') 
    136                                         { 
    137                                                 $app_extra_icons .= '<td class="extraIconsRow"><a href="' . $app_data['url'] . '"'; 
    138  
    139                                                 if(isset($GLOBALS['phpgw_info']['flags']['navbar_target']) && $GLOBALS['phpgw_info']['flags']['navbar_target']) 
    140                                                 { 
    141                                                         $app_extra_icons .= ' target="' . $GLOBALS['phpgw_info']['flags']['navbar_target'] . '"'; 
    142                                                 } 
    143  
    144                                                 $app_extra_icons .= ' >' . $icon . '</a></td>'; 
    145                                         } 
    146  
    147  
    148                                                 $app_extra_icons .= '<td align="left" class="extraIconsRow" style=""><a href="'.$app_data['url'] . '"'; 
    149  
    150                                                 if(isset($GLOBALS['phpgw_info']['flags']['navbar_target']) && $GLOBALS['phpgw_info']['flags']['navbar_target']) 
    151                                                 { 
    152                                                         $app_extra_icons .= ' target="' . $GLOBALS['phpgw_info']['flags']['navbar_target'] . '"'; 
    153                                                 } 
    154  
    155                                                 $app_extra_icons .= '>' . $title_extra . '</a></td></tr>'; 
    156  
    157                                         unset($icon); 
    158                                         unset($title); 
    159                                         $i++;                            
    160                                 } 
    161                         } 
    162                          
    163                         if($GLOBALS['phpgw_info']['user']['preferences']['common']['start_and_logout_icons']!='no')      
    164                         { 
    165                          
    166                                 $hint = $GLOBALS['phpgw_info']['navbar']['logout']['title']; 
    167                                 $icon = '<img id="logout_id" width="24" height="24" src="'.$GLOBALS['phpgw_info']['navbar']['logout']['icon'].'"  alt="'.$hint.'" title="'.$hint.'">'; 
    168                                  
    169                                 if($GLOBALS['phpgw_info']['user']['preferences']['common']['navbar_format']=='icons') { 
    170                                          
    171                                                 $title = ''; 
    172                                 } 
    173                                 else if($GLOBALS['phpgw_info']['user']['preferences']['common']['navbar_format']=='text'){ 
    174                                          
    175                                                 $icon = ''; 
    176                                 }                        
    177                                 $app_icons .= '<td nowrap '. 
    178                                 'onmouseover="javascript:this.className=\'navbar_butOver\'; zoom_in(this.firstChild.firstChild.id)" '. 
    179                                 'onmouseout="javascript:this.className=\'navbar_but\'; zoom_out(this.firstChild.firstChild.id)" '. 
    180                                 'class="navbar_but"><a onclick="location.href=\''.$GLOBALS['phpgw_info']['navbar']['logout']['url'].'\'">'.$icon.'</td>'; 
    181                         }                       //                      window.location.href=\''.$GLOBALS['phpgw_info']['navbar']['logout']['url'].'\' 
    182                          
    183                         $var['app_icons'] = $app_icons; 
    184                          
    185                         $hint = $GLOBALS['phpgw_info']['navbar']['logout']['title']; 
    186                         $icon = '<img src="'.$GLOBALS['phpgw_info']['navbar']['logout']['icon'].'"  alt="'.$hint.'" title="'.$hint.'">'; 
    187                         $title = $GLOBALS['phpgw_info']['navbar']['logout']['title']; 
    188                          
    189                         $app_extra_icons .= '<td  class="extraIconsRow"> 
    190                                 <a href="'.$GLOBALS['phpgw_info']['navbar']['logout']['url'].'">'.$icon.'</a></td>'; 
    191  
    192                         $app_extra_icons .= '<td class="extraIconsRow"> 
    193                                 <a href="'.$GLOBALS['phpgw_info']['navbar']['logout']['url'].'">'.$title.'</a></td>'; 
    194  
    195                                  
    196                                 $app_extra_icons_div = ' 
    197                                 <script language="javascript"> 
    198                                 new ypSlideOutMenu("menu1", "down", 5, 24, 160, 200,\'left\') 
     175                else if($GLOBALS['phpgw_info']['user']['preferences']['common']['navbar_format']=='text'){ 
     176 
     177                        $icon = ''; 
     178                }                        
     179                $app_icons .= '<td nowrap '. 
     180                        'onmouseover="javascript:this.className=\'navbar_butOver\'; zoom_in(this.firstChild.firstChild.id)" '. 
     181                        'onmouseout="javascript:this.className=\'navbar_but\'; zoom_out(this.firstChild.firstChild.id)" '. 
     182                        'class="navbar_but"><a onclick="location.href=\''.$GLOBALS['phpgw_info']['navbar']['logout']['url'].'\'">'.$icon.'</td>'; 
     183        }                       //                      window.location.href=\''.$GLOBALS['phpgw_info']['navbar']['logout']['url'].'\' 
     184 
     185        $var['app_icons'] = $app_icons; 
     186 
     187        $hint = $GLOBALS['phpgw_info']['navbar']['logout']['title']; 
     188        $icon = '<img src="'.$GLOBALS['phpgw_info']['navbar']['logout']['icon'].'"  alt="'.$hint.'" title="'.$hint.'">'; 
     189        $title = $GLOBALS['phpgw_info']['navbar']['logout']['title']; 
     190 
     191        $app_extra_icons .= '<td  class="extraIconsRow"> 
     192                <a href="'.$GLOBALS['phpgw_info']['navbar']['logout']['url'].'">'.$icon.'</a></td>'; 
     193 
     194        $app_extra_icons .= '<td class="extraIconsRow"> 
     195                <a href="'.$GLOBALS['phpgw_info']['navbar']['logout']['url'].'">'.$title.'</a></td>'; 
     196 
     197 
     198        $app_extra_icons_div = ' 
     199                <script language="javascript"> 
     200new ypSlideOutMenu("menu1", "down", 5, 24, 160, 200,\'left\') 
    199201                                </script> 
    200202                                <div id="menu1Container"> 
     
    246248                        . lang($GLOBALS['phpgw']->common->show_date($now,'l')) . ' ' 
    247249                        . $GLOBALS['phpgw']->common->show_date($now,$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']); 
    248                          
     250 
    249251                        if($GLOBALS['phpgw_info']['server']['use_frontend_name']) 
    250252                                $var['frontend_name'] = " - ".$GLOBALS['phpgw_info']['server']['use_frontend_name']; 
     
    257259                        { 
    258260                                $agreeterm_url = $_SERVER['HTTP_HOST'] . $GLOBALS['phpgw_info']['server']['webserver_url'] . '/preferences/termo_aceite.php'; 
    259                                  
     261 
    260262                                if ($GLOBALS['phpgw_info']['server']['use_https'] == 2) 
    261263                                        $agreeterm_url = 'https://' . $agreeterm_url; 
    262264                                else 
    263265                                        $agreeterm_url = 'http://' . $agreeterm_url; 
    264                                  
     266 
    265267                                echo '<script>' . 
    266                                                 'if(location.href.indexOf("termo_aceite.php") == -1){' . 
    267                                                         'location.href = "' . $agreeterm_url . '"' . 
    268                                                 '}' . 
    269                                          '</script>'; 
    270                         } 
    271                          
     268                                        'if(location.href.indexOf("termo_aceite.php") == -1){' . 
     269                                        'location.href = "' . $agreeterm_url . '"' . 
     270                                        '}' . 
     271                                        '</script>'; 
     272                        } 
     273 
    272274 
    273275                        if(($GLOBALS['phpgw_info']['user']['lastpasswd_change'] == '0') && (($GLOBALS['phpgw_info']['user']['agree_terms'] == 1) || ($GLOBALS['phpgw_info']['server']['use_agree_term']!='True'))) 
    274276                        { 
    275277                                $changepasswd_url = $_SERVER['HTTP_HOST'] . $GLOBALS['phpgw_info']['server']['webserver_url'] . '/preferences/changepassword.php?cd=1'; 
    276                                  
     278 
    277279                                if ($GLOBALS['phpgw_info']['server']['use_https'] > 0) 
    278280                                        $changepasswd_url = 'https://' . $changepasswd_url; 
    279281                                else 
    280282                                        $changepasswd_url = 'http://' . $changepasswd_url; 
    281                                  
     283 
    282284                                echo '<script>' . 
    283                                                 'if(location.href.indexOf("changepassword.php") == -1){' . 
    284                                                         'location.href = "' . $changepasswd_url . '"' . 
    285                                                 '}' . 
    286                                          '</script>'; 
    287                                  
     285                                        'if(location.href.indexOf("changepassword.php") == -1){' . 
     286                                        'location.href = "' . $changepasswd_url . '"' . 
     287                                        '}' . 
     288                                        '</script>'; 
     289 
    288290                                /* 
    289                                 $api_messages = lang('You are required to change your password during your first login') 
     291                                        $api_messages = lang('You are required to change your password during your first login') 
    290292                                . '<br> Click this image on the navbar: <img src="' 
    291293                                . $GLOBALS['phpgw']->common->image('preferences','navbar.gif').'">'; 
    292                                 */ 
     294                                 */ 
    293295                        } 
    294296                        /* 
     
    297299                                $api_messages = lang('it has been more then %1 days since you changed your password',30); 
    298300                        } 
    299                         */ 
     301                         */ 
    300302                        /* 
    301303                        // This is gonna change 
     
    314316 
    315317                        /******************************************************\ 
    316                         * The sidebox menu's                                   * 
    317                         \******************************************************/ 
     318                         * The sidebox menu's                                   * 
     319                         \******************************************************/ 
    318320 
    319321                        $menu_title = lang('General Menu'); 
     
    379381                        $GLOBALS['phpgw']->hooks->process('after_navbar'); 
    380382                        return; 
     383} 
     384 
     385function display_sidebox($appname,$menu_title,$file) 
     386{ 
     387        if(!$appname || ($appname==$GLOBALS['phpgw_info']['flags']['currentapp'] && $file)) 
     388        { 
     389                $var['lang_title']=$menu_title;//$appname.' '.lang('Menu'); 
     390                $GLOBALS['celepar_tpl']->set_var($var); 
     391                $GLOBALS['celepar_tpl']->pfp('out','extra_blocks_header'); 
     392 
     393                foreach($file as $text => $url) 
     394                { 
     395                        sidebox_menu_item($url,$text); 
    381396                } 
    382397 
    383                 function display_sidebox($appname,$menu_title,$file) 
     398                $GLOBALS['celepar_tpl']->pparse('out','extra_blocks_footer'); 
     399        } 
     400} 
     401 
     402function sidebox_menu_item($item_link='',$item_text='') 
     403{ 
     404        if($item_text === '_NewLine_' || $item_link === '_NewLine_') 
     405        { 
     406                $GLOBALS['celepar_tpl']->pparse('out','extra_block_spacer'); 
     407        } 
     408        else 
     409        { 
     410                $var['icon_or_star']='<img src="'.$GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/'.$GLOBALS['phpgw_info']['server']['template_set'].'/images'.'/orange-ball.png" width="9" height="9" alt="ball"/>'; 
     411                $var['target'] = ''; 
     412                if(is_array($item_link)) 
    384413                { 
    385                         if(!$appname || ($appname==$GLOBALS['phpgw_info']['flags']['currentapp'] && $file)) 
    386                         { 
    387                                 $var['lang_title']=$menu_title;//$appname.' '.lang('Menu'); 
    388                                 $GLOBALS['celepar_tpl']->set_var($var); 
    389                                 $GLOBALS['celepar_tpl']->pfp('out','extra_blocks_header'); 
    390  
    391                                 foreach($file as $text => $url) 
    392                                 { 
    393                                         sidebox_menu_item($url,$text); 
    394                                 } 
    395  
    396                                 $GLOBALS['celepar_tpl']->pparse('out','extra_blocks_footer'); 
     414                        if(isset($item_link['icon'])) 
     415                        { 
     416                                $app = isset($item_link['app']) ? $item_link['app'] : $GLOBALS['phpgw_info']['flags']['currentapp']; 
     417                                $var['icon_or_star'] = '<img src="'.$GLOBALS['phpgw']->common->image($app,$item_link['icon']).'"/>'; 
     418                        } 
     419                        $var['lang_item'] = isset($item_link['no_lang']) && $item_link['no_lang'] ? $item_link['text'] : lang($item_link['text']); 
     420                        $var['item_link'] = $item_link['link']; 
     421                        if ($item_link['target']) 
     422                        { 
     423                                $var['target'] = ' target="' . $item_link['target'] . '"'; 
    397424                        } 
    398425                } 
    399  
    400                 function sidebox_menu_item($item_link='',$item_text='') 
     426                else 
    401427                { 
    402                         if($item_text === '_NewLine_' || $item_link === '_NewLine_') 
    403                         { 
    404                                 $GLOBALS['celepar_tpl']->pparse('out','extra_block_spacer'); 
    405                         } 
    406                         else 
    407                         { 
    408                                 $var['icon_or_star']='<img src="'.$GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/'.$GLOBALS['phpgw_info']['server']['template_set'].'/images'.'/orange-ball.png" width="9" height="9" alt="ball"/>'; 
    409                                 $var['target'] = ''; 
    410                                 if(is_array($item_link)) 
    411                                 { 
    412                                         if(isset($item_link['icon'])) 
    413                                         { 
    414                                                 $app = isset($item_link['app']) ? $item_link['app'] : $GLOBALS['phpgw_info']['flags']['currentapp']; 
    415                                                 $var['icon_or_star'] = '<img src="'.$GLOBALS['phpgw']->common->image($app,$item_link['icon']).'"/>'; 
    416                                         } 
    417                                         $var['lang_item'] = isset($item_link['no_lang']) && $item_link['no_lang'] ? $item_link['text'] : lang($item_link['text']); 
    418                                         $var['item_link'] = $item_link['link']; 
    419                                         if ($item_link['target']) 
    420                                         { 
    421                                                 $var['target'] = ' target="' . $item_link['target'] . '"'; 
    422                                         } 
    423                                 } 
    424                                 else 
    425                                 { 
    426                                         $var['lang_item'] = lang($item_text); 
    427                                         $var['item_link'] = $item_link; 
    428                                 } 
    429                                 $GLOBALS['celepar_tpl']->set_var($var); 
    430                                 $GLOBALS['celepar_tpl']->pparse('out','extra_block_row'); 
    431                         } 
     428                        $var['lang_item'] = lang($item_text); 
     429                        $var['item_link'] = $item_link; 
    432430                } 
    433  
    434                 function parse_navbar_end() 
    435                 { 
    436                         $GLOBALS['celepar_tpl'] = createobject('phpgwapi.Template',PHPGW_TEMPLATE_DIR); 
    437  
    438                         $GLOBALS['celepar_tpl']->set_file( 
    439                                 array( 
    440                                         'footer' => 'footer.tpl' 
    441                                 ) 
    442                         ); 
    443                          
    444                         $var = Array( 
    445                                 'img_root'       => $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/'.$GLOBALS['phpgw_info']['server']['template_set'].'/images', 
    446                                 'table_bg_color' => $GLOBALS['phpgw_info']['theme']['navbar_bg'], 
    447                                 'version'        => $GLOBALS['phpgw_info']['server']['versions']['phpgwapi'] 
    448                         ); 
    449                         $GLOBALS['phpgw']->hooks->process('navbar_end'); 
    450                          
    451  
    452                         if($GLOBALS['phpgw_info']['user']['preferences']['common']['show_generation_time']) 
    453                         { 
    454                                 $mtime = microtime();  
    455                                 $mtime = explode(' ',$mtime);  
    456                                 $mtime = $mtime[1] + $mtime[0];  
    457                                 $tend = $mtime;  
    458                                 $totaltime = ($tend - $GLOBALS['page_start_time']);  
    459  
    460                                 $var['page_generation_time'] = '<div id="divGenTime"><br/><span>'.lang('Page was generated in %1 seconds',$totaltime).'</span></div>'; 
    461                         } 
    462  
    463                         $var['powered_by'] = lang('Powered by phpGroupWare version %1',$GLOBALS['phpgw_info']['server']['versions']['phpgwapi']); 
    464                         $GLOBALS['celepar_tpl']->set_var($var); 
    465                         $GLOBALS['celepar_tpl']->pfp('out','footer'); 
    466                 } 
     431                $GLOBALS['celepar_tpl']->set_var($var); 
     432                $GLOBALS['celepar_tpl']->pparse('out','extra_block_row'); 
     433        } 
     434} 
     435 
     436function parse_navbar_end() 
     437{ 
     438        $GLOBALS['celepar_tpl'] = createobject('phpgwapi.Template',PHPGW_TEMPLATE_DIR); 
     439 
     440        $GLOBALS['celepar_tpl']->set_file( 
     441                array( 
     442                        'footer' => 'footer.tpl' 
     443                ) 
     444        ); 
     445 
     446        $var = Array( 
     447                'img_root'       => $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/'.$GLOBALS['phpgw_info']['server']['template_set'].'/images', 
     448                'table_bg_color' => $GLOBALS['phpgw_info']['theme']['navbar_bg'], 
     449                'version'        => $GLOBALS['phpgw_info']['server']['versions']['phpgwapi'] 
     450        ); 
     451        $GLOBALS['phpgw']->hooks->process('navbar_end'); 
     452 
     453 
     454        if($GLOBALS['phpgw_info']['user']['preferences']['common']['show_generation_time']) 
     455        { 
     456                $mtime = microtime();  
     457                $mtime = explode(' ',$mtime);  
     458                $mtime = $mtime[1] + $mtime[0];  
     459                $tend = $mtime;  
     460                $totaltime = ($tend - $GLOBALS['page_start_time']);  
     461 
     462                $var['page_generation_time'] = '<div id="divGenTime"><br/><span>'.lang('Page was generated in %1 seconds',$totaltime).'</span></div>'; 
     463        } 
     464 
     465        $var['powered_by'] = lang('Powered by phpGroupWare version %1',$GLOBALS['phpgw_info']['server']['versions']['phpgwapi']); 
     466        $GLOBALS['celepar_tpl']->set_var($var); 
     467        $GLOBALS['celepar_tpl']->pfp('out','footer'); 
     468} 
  • trunk/phpgwapi/templates/default/navbar.tpl

    r2495 r2529  
    9999  <td width="30%" id="admin_info" nowrap>{current_users}</td> 
    100100  <td style="padding-right:10px" width="*" align="right" valign="center" nowrap="true"> 
    101                 <a href="{dir_root}/preferences/" title="{title_my_preferences}" alt="{title_my_preferences}" onmouseover="javascript:self.status='{title_my_preferences}'" onmouseout="javascript:self.status=''"><img height="15px" src="{dir_root}/phpgwapi/templates/{template}/images/preferences.png"><font id="links_bar">{my_preferences}</font></a> 
     101                <a href="{dir_root}/preferences/" title="{title_my_preferences}" alt="{title_my_preferences}" cacheit="true" onmouseover="javascript:self.status='{title_my_preferences}'" onmouseout="javascript:self.status=''"><img height="15px" src="{dir_root}/phpgwapi/templates/{template}/images/preferences.png"><font id="links_bar">{my_preferences}</font></a> 
    102102                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  
    103103                <a href="#" title="{title_suggestions}" alt="{title_suggestions}" onmouseover="javascript:self.status='{title_suggestions}'" onmouseout="javascript:self.status=''" onclick="javascript:openWindow(400,550,'{dir_root}/help/enviasugestao.php')"><img src="{dir_root}/phpgwapi/templates/{template}/images/critic.png"><font id="links_bar">{suggestions}</font></a> 
Note: See TracChangeset for help on using the changeset viewer.