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