source: trunk/expressoMail1_2/index.php @ 5761

Revision 5761, 27.4 KB checked in by douglas, 11 years ago (diff)

Ticket #2549 - correção na abertura da tela de filtros

  • Property svn:eol-style set to native
  • Property svn:executable set to *
Line 
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<div class="expressomail-module-container">
3</div>
4<?php
5                /***************************************************************************
6                * Expresso Livre                                                           *
7                * http://www.expressolivre.org                                             *
8                * --------------------------------------------                             *
9                *  This program is free software; you can redistribute it and/or modify it *
10                *  under the terms of the GNU General Public License as published by the   *
11                *  Free Software Foundation; either version 2 of the License, or (at your  *
12                *  option) any later version.                                              *
13                \**************************************************************************/
14               
15        $GLOBALS['phpgw_info']['flags'] = array(
16                'noheader' => False,
17                'nonavbar' => false,
18                'currentapp' => 'expressoMail1_2',
19                'enable_nextmatchs_class' => True
20        );
21       
22        require_once('../header.inc.php');
23        $update_version = $GLOBALS['phpgw_info']['apps']['expressoMail1_2']['version'];
24        $_SESSION['phpgw_info']['expressomail']['user'] = $GLOBALS['phpgw_info']['user'];
25        $GLOBALS['phpgw']->css->validate_file('expressoMail1_2/templates/' . $GLOBALS['phpgw_info']['server']['template_set'] . '/main.css');
26        $GLOBALS['phpgw']->css->validate_file('phpgwapi/js/dftree/dftree.css');
27        echo $GLOBALS['phpgw']->css->get_css();
28        echo "<script type='text/javascript'>var template = '".$_SESSION['phpgw_info']['expressoMail1_2']['user']['preferences']['common']['template_set']."';</script>";
29        echo "<script src='js/modal/modal.js'></script>";
30        //jquery and Editor
31        echo '                         
32                <link rel="stylesheet" type="text/css" href="../prototype/plugins/fullcalendar/fullcalendar.css"></link>
33                <link rel="stylesheet" type="text/css" href="../prototype/plugins/fullcalendar/fullcalendar.print.css"></link>
34                <link rel="stylesheet" type="text/css" href="../prototype/plugins/icalendar/jquery.icalendar.css"></link>
35       
36                <script type="text/javascript" src="../prototype/plugins/jquery/jquery.min.js"></script>
37
38                <script type="text/javascript" src="../prototype/plugins/jquery/jquery-ui.min.js"></script>
39                <script src="../prototype/plugins/json2/json2.js" language="javascript"></script>
40                <script src="../prototype/plugins/ejs/ejs.js" language="javascript"></script>
41                <script src="../prototype/plugins/store/jquery.store.js" language="javascript"></script>
42                <script src="../prototype/plugins/farbtastic/farbtastic.js" language="javascript"></script>
43                <script src="../prototype/api/datalayer.js" language="javascript"></script>                                     
44                <script type="text/javascript" src="../prototype/plugins/scrollto/jquery.scrollTo.js"></script>
45                <script language="javascript">DataLayer.dispatchPath = "../prototype/";</script>                                       
46                <script src="../library/ckeditor/ckeditor.js" language="javascript"></script>
47                <script src="../library/ckeditor/adapters/jquery.js" language="javascript"></script>
48                <link rel="Stylesheet" type="text/css" href="../prototype/plugins/jquery/jquery-ui.css" />                                     
49               
50                <link rel="stylesheet" type="text/css" href="../prototype/plugins/contextmenu/jquery.contextMenu.css"></link>
51                <link rel="stylesheet" type="text/css" href="../prototype/plugins/zebradialog/css/zebra_dialog.css"></link>
52                <link rel="stylesheet" type="text/css" href="../prototype/plugins/fileupload/jquery.fileupload-ui.css"></link>
53               
54                <link rel="stylesheet" href="../prototype/plugins/farbtastic/farbtastic.css" type="text/css" >
55                <script type="text/javascript" src="../prototype/plugins/zebradialog/javascript/zebra_dialog.js"></script>
56                <script type="text/javascript" src="../prototype/plugins/datejs/date-pt-BR.js"></script>
57                <script type="text/javascript" src="../prototype/plugins/datejs/sugarpak.js"></script>
58                <script type="text/javascript" src="../prototype/plugins/datejs/parser.js"></script>
59
60                <script type="text/javascript" src="../prototype/plugins/watermark/jquery.watermarkinput.js"></script>
61                <script type="text/javascript" src="../prototype/plugins/mask/jquery.maskedinput.js"></script>
62                <script type="text/javascript" src="../prototype/plugins/alphanumeric/jquery.alphanumeric.js"></script>
63               
64                <script type="text/javascript" src="../prototype/plugins/jquery-elastic/jquery.elastic.source.js"></script>
65               
66                <script type="text/javascript" src="../prototype/plugins/qtip/jquery.qtip-1.0.0-rc3.min.js"></script>
67                <script type="text/javascript" src="../prototype/plugins/contextmenu/jquery.contextMenu.js"></script>
68                <script type="text/javascript" src="../prototype/plugins/fileupload/jquery.fileupload.js"></script>
69                <script type="text/javascript" src="../prototype/plugins/fileupload/jquery.iframe-transport.js"></script>
70                <!-- <script type="text/javascript" src="../prototype/plugins/contextmenu/jquery.ui.position.js"></script> -->
71               
72                <script type="text/javascript" src="../prototype/modules/calendar/js/timezone.js"></script>
73                <script type="text/javascript" src="../prototype/plugins/dateFormat/dateFormat.js"></script>
74                <script type="text/javascript" src="../prototype/modules/calendar/js/calendar.date.js"></script>
75                <script type="text/javascript" src="../prototype/modules/calendar/js/calendar.codecs.js"></script>
76               
77
78                <script src="js/rich_text_editor.js" type="text/javascript"></script>
79                <script src="js/base64.js" type="text/javascript"></script>
80               
81                <script type="text/javascript">
82                    User.moduleName = "expressoMail1_2";
83                </script>
84
85
86                ';
87        //---------------------------//
88
89        echo "<script src='js/globals.js?".$update_version."' type='text/javascript'></script>";
90        echo "<script src='js/sniff_browser.js?".$update_version."' type='text/javascript'></script>";
91        echo "<script src='js/QuickCatalogSearch.js' type='text/javascript'></script>";
92        //echo "<style type='text/css'>@import url(../phpgwapi/js/jscalendar/calendar-win2k-1.css);</style>";
93        //echo "<script src='../phpgwapi/js/jscalendar/calendar.js?".$update_version."' type='text/javascript'></script>";
94        //echo "<script src='../phpgwapi/js/jscalendar/calendar-setup.js?".$update_version."' type='text/javascript'></script>";
95        //echo "<script src='../phpgwapi/js/jscalendar/lang/calendar-br.js?".$update_version."' type='text/javascript'></script>";
96        echo '<script type="text/javascript" src="../phpgwapi/js/wz_dragdrop/wz_dragdrop.js?'.$update_version.'"></script>
97                <script type="text/javascript" src="../phpgwapi/js/dJSWin/dJSWin.js?'.$update_version.'"></script>
98                <script type="text/javascript" src="../phpgwapi/js/x_tools/xtools.js?'.$update_version.'"></script>';           
99
100        echo ' 
101                <script type="text/javascript" src="../prototype/plugins/treeview/jquery.treeview.js"></script>
102                <script type="text/javascript" src="../prototype/plugins/treeview/lib/jquery.cookie.js"></script>
103                <script type="text/javascript" src="../prototype/plugins/block/jquery.blockUI.js"></script>
104                <script type="text/javascript" src="../prototype/plugins/scrollto/jquery.scrollTo.js"></script>
105
106                <link rel="stylesheet" href="../prototype/plugins/treeview/jquery.treeview.css" type="text/css" media="screen" />
107               
108                <script src="../prototype/plugins/jqgrid/js/i18n/grid.locale-pt-br.js" type="text/javascript"></script>
109                <script src="../prototype/plugins/jqgrid/js/jquery.jqGrid.min.js" type="text/javascript"></script>
110                <script src="../prototype/modules/mail/js/foldertree.js" type="text/javascript"></script>
111                <link rel="stylesheet" href="../prototype/modules/mail/css/foldertree.css" type="text/css" media="screen" />
112               
113                <link rel="stylesheet" href="../prototype/plugins/jqgrid/css/ui.jqgrid.css" type="text/css" /> 
114                <link rel="stylesheet" href="../prototype/plugins/jqgrid/themes/prognusone/jquery-ui-1.8.2.custom.css" type="text/css" />       
115
116                <script src="../prototype/plugins/countdown/jquery.countdown.min.js" type="text/javascript"></script>
117                <script src="../prototype/plugins/countdown/jquery.countdown-pt-BR.js" type="text/javascript"></script>         
118               
119                <script src="../prototype/modules/mail/js/label.js" type="text/javascript"></script>   
120                <script src="../prototype/modules/mail/js/followupflag.js" type="text/javascript"></script>
121                <link rel="stylesheet" href="../prototype/modules/mail/css/followupflag.css" type="text/css" />
122                <link rel="stylesheet" href="../prototype/modules/attach_message/attach_message.css" type="text/css" />
123                <link rel="stylesheet" href="../prototype/modules/mail/css/label.css" type="text/css" />';     
124       
125        /*
126         * TODO: implementar o controle como preferência do usuário
127         *
128         */
129        $jcarousel = false;
130        if ($jcarousel) {
131                //jcarousel
132                echo "\n".'<link rel="stylesheet" type="text/css" href="../library/jcarousel/skins/default/skin.css" />';
133                echo "\n".'<script src="../library/jcarousel/lib/jquery.jcarousel.min.js" type="text/javascript"></script>';
134
135                //fancybox
136                echo "\n".'<link rel="stylesheet" type="text/css" href="../library/fancybox/jquery.fancybox-1.3.4.css" />';             
137                echo "\n".'<script src="../library/fancybox/jquery.fancybox-1.3.4.pack.js" type="text/javascript"></script>';
138        }
139
140        echo "<div id='overlay' style='background-color: #AAAAAAA; opacity: .50; filter:Alpha(Opacity=50); height: 100%; width: 100%; position: absolute; top: 0; left: 0; visibility: hidden; z-index: 30000000000000000000000'></div>";
141
142       
143        //Enable/Disable VoIP Service -> Voip Server Config
144        $voip_enabled = false;
145        $voip_groups = array();
146        if($GLOBALS['phpgw_info']['server']['voip_groups']) {
147                $emailVoip = false;
148                foreach(explode(",",$GLOBALS['phpgw_info']['server']['voip_groups']) as $i => $voip_group){
149                        $a_voip = explode(";",$voip_group);                     
150                        $voip_groups[] = $a_voip[1];
151                }
152                foreach($GLOBALS['phpgw']->accounts->membership() as $idx => $group){                   
153                        if(array_search($group['account_name'],$voip_groups) !== FALSE){                 
154                                $voip_enabled = true;
155                                $emailVoip = $GLOBALS['phpgw_info']['server']['voip_email_redirect'];
156                                break;
157                        }
158                }
159        }
160
161        //Local messages
162        $_SESSION['phpgw_info']['server']['expressomail']['enable_local_messages'] = $current_config['enable_local_messages'];
163
164        // Get Data from ldap_manager and emailadmin.
165        $ldap_manager = CreateObject('contactcenter.bo_ldap_manager');
166        $boemailadmin   = CreateObject('emailadmin.bo');
167        $emailadmin_profile = $boemailadmin->getProfileList();
168    // Loading Admin Config Module
169    $c = CreateObject('phpgwapi.config','expressoMail1_2');
170    $c->read_repository();
171    $current_config = $c->config_data;   
172
173    //Carrega Configuração global do expressoMail
174        $_SESSION['phpgw_info']['expresso']['expressoMail'] =  $current_config;
175   
176        $_SESSION['phpgw_info']['expressomail']['email_server'] = $boemailadmin->getProfile($emailadmin_profile[0]['profileID']);
177        //$_SESSION['phpgw_info']['expressomail']['user'] = $GLOBALS['phpgw_info']['user'];
178        $_SESSION['phpgw_info']['expressomail']['server'] = $GLOBALS['phpgw_info']['server'];
179        $_SESSION['phpgw_info']['expressomail']['ldap_server'] = $ldap_manager ? $ldap_manager->srcs[1] : null;
180        $_SESSION['phpgw_info']['expressomail']['user']['email'] = $GLOBALS['phpgw']->preferences->values['email'];
181        $_SESSION['phpgw_info']['server']['temp_dir'] = $GLOBALS['phpgw_info']['server']['temp_dir'];
182       
183        $preferences = $GLOBALS['phpgw']->preferences->read();
184        $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['gears_firefox_windows'] = $current_config['expressoMail_gears_firefox_windows'] ? $current_config['expressoMail_gears_firefox_windows'] : "";
185        $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['gears_firefox_linux'] = $current_config['expressoMail_gears_firefox_linux'] ? $current_config['expressoMail_gears_firefox_linux'] : "";
186        $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['gears_ie'] = $current_config['expressoMail_gears_ie'] ? $current_config['expressoMail_gears_ie'] : "";
187        $_SESSION['phpgw_info']['user']['preferences']['expressoMail'] = $preferences['enable_local_messages'];
188        $_SESSION['phpgw_info']['user']['preferences']['expressoMail'] = $preferences['expressoMail'];
189        $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['voip_enabled'] = $voip_enabled;
190        $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['voip_email_redirect'] = $emailVoip;
191        $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['outoffice'] = $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['outoffice'];
192        $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['telephone_number'] = $GLOBALS['phpgw_info']['user']['telephonenumber'];
193        $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['use_cache'] = $current_config['expressoMail_enable_cache'];
194        $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['use_x_origin'] = $current_config['expressoMail_use_x_origin'];
195        $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['number_of_contacts'] = $current_config['expressoMail_Number_of_dynamic_contacts'] ? $current_config['expressoMail_Number_of_dynamic_contacts'] : "0";
196        $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['notification_domains'] = $current_config['expressoMail_notification_domains'];
197        $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['googlegears_url'] = $current_config['expressoMail_googlegears_url'];
198    $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['use_assinar_criptografar'] = $GLOBALS['phpgw_info']['server']['use_assinar_criptografar'] ?  $GLOBALS['phpgw_info']['server']['use_assinar_criptografar'] : "0";
199    $_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";
200    $_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";
201    $_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";
202    $_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";
203    $_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";
204    $_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";
205        $_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";
206
207        $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['max_attachment_size'] = $current_config['expressoMail_Max_attachment_size'] ? $current_config['expressoMail_Max_attachment_size']."M" : '';
208        $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['max_msg_size'] = $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['max_msg_size'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['max_msg_size'] : "0";
209        $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['imap_max_folders'] = $current_config['expressoMail_imap_max_folders'];
210        $_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";
211        $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['extended_info'] = $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['extended_info']?$_SESSION['phpgw_info']['user']['preferences']['expressoMail']['extended_info'] = $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['extended_info']:'0';
212        $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['from_to_sent'] = $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['from_to_sent'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['from_to_sent'] : "0";
213        $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['auto_create_local'] = $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['auto_create_local'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['auto_create_local'] : "0";
214        $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['return_recipient_deafault'] = $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['return_recipient_deafault'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['return_recipient_deafault'] : "0";
215
216        $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['quick_search_default'] = $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['quick_search_default'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['quick_search_default'] : 1;
217        $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['auto_close_first_tab'] = $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['auto_close_first_tab'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['auto_close_first_tab'] : "0";
218       
219        $template = CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
220        $template->set_var("txt_loading",lang("Loading"));
221        $template->set_var("txt_clear_trash",lang("message(s) deleted from your trash folder."));
222    $template->set_var("new_message", lang("New Message"));
223        $template->set_var("lang_inbox", lang("Inbox"));
224    $template->set_var("refresh", lang("Refresh"));
225    $template->set_var("tools", lang("Tools"));
226        $template->set_var("lang_Open_Search_Window", lang("Open search window") . '...');
227        $template->set_var("lang_search_user", lang("Search user") . '...');
228        $template->set_var("upload_max_filesize",ini_get('upload_max_filesize'));
229        $template->set_var("msg_folder",$_GET['msgball']['folder']);
230        $template->set_var("msg_number",$_GET['msgball']['msgnum'] ? $_GET['msgball']['msgnum'] : $_GET['to']);
231        $template->set_var("user_email",$_SESSION['phpgw_info']['expressomail']['user']['email']);
232        include_once dirname(__FILE__) . '/../header.inc.php';
233        require_once dirname(__FILE__) . '/../services/class.servicelocator.php';
234        $alternativeMailService = ServiceLocator::getService('ldap');
235        $AlternateEmailExpresso = Array();
236        $AlternateEmailExpresso = $alternativeMailService->getMailAlternateByUidNumber($_SESSION['phpgw_info']['expressomail']['user']['account_id']);
237        $template->set_var("user_email_alternative", implode(",", $AlternateEmailExpresso));   
238        $acc = CreateObject('phpgwapi.accounts');
239        $template->set_var("user_organization", $acc->get_organization($GLOBALS['phpgw_info']['user']['account_dn']));
240        $template->set_var("cyrus_delimiter",$_SESSION['phpgw_info']['expressomail']['email_server']['imapDelimiter']);
241        $template->set_var("lang_contact_details", lang("Contact Details"));
242        $template->set_var("lang_catalog", lang("catalog"));
243        $template->set_var("lang_search", lang("search"));
244        $template->set_var("lang_page", lang("page"));
245        $template->set_var("lang_quick_search_users_dialog_title", lang("Quick Search Contacts"));
246        $template->set_var("lang_global_catalog", lang("Global Catalog"));
247        $template->set_var("lang_personal_catalog", lang("Personal Catalog"));
248        $template->set_var("lang_all_catalogs", lang("All Catalogs"));
249        // Fix problem with cyrus delimiter changes in preferences.
250        // Dots in names: enabled/disabled.
251        $save_in_folder = @eregi_replace("INBOX/", "INBOX".$_SESSION['phpgw_info']['expressomail']['email_server']['imapDelimiter'], $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['save_in_folder']);
252        $save_in_folder = @eregi_replace("INBOX.", "INBOX".$_SESSION['phpgw_info']['expressomail']['email_server']['imapDelimiter'], $save_in_folder);
253        $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['save_in_folder'] = $save_in_folder;
254        // End Fix.
255
256        $template->set_file(Array('expressoMail' => 'index.tpl'));
257        $template->set_block('expressoMail','list');
258        $template->pfp('out','list');
259        $GLOBALS['phpgw']->common->phpgw_footer();
260   
261    $_SESSION['phpgw_info']['server']['expressomail']['expressoMail_enable_log_messages'] = $current_config['expressoMail_enable_log_messages'];
262       
263    // Begin Set Anti-Spam options.
264    $_SESSION['phpgw_info']['server']['expressomail']['expressoMail_command_for_ham'] = $current_config['expressoMail_command_for_ham'];
265    $_SESSION['phpgw_info']['server']['expressomail']['expressoMail_command_for_spam'] = $current_config['expressoMail_command_for_spam'];
266    $_SESSION['phpgw_info']['server']['expressomail']['expressoMail_use_spam_filter'] = $current_config['expressoMail_use_spam_filter'];   
267    echo '<script> var use_spam_filter = \''.$current_config['expressoMail_use_spam_filter'].'\'
268           var sieve_forward_domains = \''.$current_config['expressoMail_sieve_forward_domains'].'\' </script>';
269        // End Set Anti-Spam options.
270
271        // Begin Set Hidden Copy options.
272        $_SESSION['phpgw_info']['server']['expressomail']['allow_hidden_copy'] = $current_config['allow_hidden_copy'];
273        echo '<script> var allow_hidden_copy = \''.$current_config['allow_hidden_copy'].'\' </script>';
274        // End Set Hidden Copy options.
275       
276    // Set Imap Folder names options
277    $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultTrashFolder']   = $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultTrashFolder']     ? $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultTrashFolder']             : lang("Trash");
278    $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultDraftsFolder']  = $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultDraftsFolder'] ? $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultDraftsFolder']       : lang("Drafts");
279    $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultSpamFolder']    = $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultSpamFolder']      ? $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultSpamFolder']              : lang("Spam");
280    $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultSentFolder']    = $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultSentFolder']      ? $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultSentFolder']              : lang("Sent");
281
282    // gera paramero com tokens suportados ....
283    $var_tokens = '';
284    for($ii = 1; $ii < 11; $ii++)
285    {
286        if($GLOBALS['phpgw_info']['server']['test_token' . $ii . '1'])
287            $var_tokens .= $GLOBALS['phpgw_info']['server']['test_token' . $ii . '1'] . ',';
288    }
289
290    if(!$var_tokens)
291    {
292        $var_tokens = 'ePass2000Lx;/usr/lib/libepsng_p11.so,ePass2000Win;c:/windows/system32/ngp11v211.dll';
293    }
294
295    echo '
296        <script> var special_folders = new Array(4);
297                special_folders[\'Trash\'] = "'.$_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultTrashFolder'].'";
298                special_folders[\'Drafts\'] = "'.$_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultDraftsFolder'].'";
299                special_folders[\'Spam\'] = "'.$_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultSpamFolder'].'";
300                special_folders[\'Sent\'] = "'.$_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultSentFolder'].'";
301                var trashfolder = "'.$_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultTrashFolder'].'";
302                var draftsfolder = "'.$_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultDraftsFolder'].'";
303                var sentfolder = "'.$_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultSentFolder'].'";
304                var spamfolder = "'.$_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultSpamFolder'].'";
305                var token_param = "'.$var_tokens.'";
306                var locale = "'.$GLOBALS['phpgw']->common->getPreferredLanguage().'";
307                var new_agenda = "'.$current_config['new_agenda'].'";
308                $("#sideboxdragarea").hide();
309                $("#menu2Container").hide();
310    </script>
311        <script type="text/javascript" src="../prototype/plugins/timepicker/jquery-ui-timepicker-addon.js"></script>
312        <script type="text/javascript" src="../prototype/plugins/timepicker/localization/jquery-ui-timepicker-pt-BR.js"></script>
313        <script type="text/javascript" src="../prototype/plugins/jquery/i18n/jquery.ui.datepicker-pt-BR.js"></script>
314        <link rel="Stylesheet" type="text/css" href="../prototype/plugins/timepicker/jquery-ui-timepicker-addon.css" />
315        <link rel="stylesheet" type="text/css" href="../prototype/modules/calendar/css/layout.css" />
316        <link rel="stylesheet" type="text/css" href="../prototype/modules/calendar/css/style.css" />
317        <script type="text/javascript" src="../prototype/modules/filters/filters.js"></script>
318        ';
319       
320
321    // End Set Imap Folder names options
322        //User info
323        echo "<script language='javascript'> var account_id = ".$GLOBALS['phpgw_info']['user']['account_id'].";var expresso_offline = false;</script>";
324
325        $obj = createobject("expressoMail1_2.functions");
326
327        // setting timezone preference
328        $zones = $obj->getTimezones();
329        $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['timezone'] = $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['timezone'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['timezone'] : sprintf("%s", array_search("America/Sao_Paulo", $zones));
330
331        // este arquivo deve ser carregado antes que
332        // os demais pois nele contem a função get_lang
333        // que é utilizada em diversas partes
334        echo $obj -> getFilesJs("js/common_functions.js",$update_version);
335        include("inc/load_lang.php");
336
337    // INCLUDE these JS Files:
338        if ($_SESSION['phpgw_info']['user']['preferences']['expressoMail']['use_local_messages'])
339                echo "<script src='js/gears_init.js?".$update_version."'></script>";
340        echo '<script src="../phpgwapi/js/dftree/dftree.js?'.$update_version.'"></script>';
341   
342        $scripts = "js/abas.js," .
343                                "js/main.js," .
344                                "js/draw_api.js,";
345        if($_SESSION['phpgw_info']['user']['preferences']['expressoMail']['use_local_messages'])
346                $scripts .= "js/local_messages.js,";
347        $scripts .= "js/messages_controller.js," .
348                                "js/DropDownContacts.js," .
349                                "js/doiMenuData.js," .
350                                "js/connector.js";
351                               
352       
353        echo $obj -> getFilesJs($scripts, $update_version);
354        echo '
355                <script type="text/javascript">
356                        init();
357                </script>
358                <script type="text/javascript">connector.updateVersion = "'.$update_version.'";</script>';
359
360        if ($GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['use_shortcuts'])
361        {
362                echo $obj -> getFilesJs("js/shortcut.js", $update_version);
363        }
364
365        // Get Preferences or redirect to preferences page.
366        $GLOBALS['phpgw']->preferences->read_repository();
367        //print_r($_SESSION['phpgw_info']['user']['preferences']['expressoMail']);
368        unset($_SESSION['phpgw_info']['expressomail']['user']['preferences']);
369        unset($_SESSION['phpgw_info']['expressomail']['user']['acl']);
370        unset($_SESSION['phpgw_info']['expressomail']['user']['apps']);
371        unset($_SESSION['phpgw_info']['expressomail']['server']['global_denied_users']);
372        unset($_SESSION['phpgw_info']['expressomail']['server']['global_denied_groups']);
373?>
374<!-----Expresso Mail - Version Updated:<?=$update_version?>-------->
Note: See TracBrowser for help on using the repository browser.