False, 'nonavbar' => False, 'currentapp' => 'expressoMail1_2', 'enable_nextmatchs_class' => True ); require_once('../header.inc.php'); $update_version = $GLOBALS['phpgw_info']['apps']['expressoMail1_2']['version']; $_SESSION['phpgw_info']['expressomail']['user'] = $GLOBALS['phpgw_info']['user']; $GLOBALS['phpgw']->css->validate_file('expressoMail1_2/templates/' . $GLOBALS['phpgw_info']['server']['template_set'] . '/main.css'); $GLOBALS['phpgw']->css->validate_file('phpgwapi/js/dftree/dftree.css'); echo $GLOBALS['phpgw']->css->get_css(); echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ' '; //Enable/Disable VoIP Service -> Voip Server Config $voip_enabled = false; $voip_groups = array(); if($GLOBALS['phpgw_info']['server']['voip_groups']) { $emailVoip = false; foreach(explode(",",$GLOBALS['phpgw_info']['server']['voip_groups']) as $i => $voip_group){ $a_voip = explode(";",$voip_group); $voip_groups[] = $a_voip[1]; } foreach($GLOBALS['phpgw']->accounts->membership() as $idx => $group){ if(array_search($group['account_name'],$voip_groups) !== FALSE){ $voip_enabled = true; $emailVoip = $GLOBALS['phpgw_info']['server']['voip_email_redirect']; break; } } } //Local messages $_SESSION['phpgw_info']['server']['expressomail']['enable_local_messages'] = $current_config['enable_local_messages']; // Get Data from ldap_manager and emailadmin. $ldap_manager = CreateObject('contactcenter.bo_ldap_manager'); $boemailadmin = CreateObject('emailadmin.bo'); $emailadmin_profile = $boemailadmin->getProfileList(); // Loading Admin Config Module $c = CreateObject('phpgwapi.config','expressoMail1_2'); $c->read_repository(); $current_config = $c->config_data; $_SESSION['phpgw_info']['expressomail']['email_server'] = $boemailadmin->getProfile($emailadmin_profile[0]['profileID']); // $_SESSION['phpgw_info']['expressomail']['user'] = $GLOBALS['phpgw_info']['user']; $_SESSION['phpgw_info']['expressomail']['server'] = $GLOBALS['phpgw_info']['server']; $_SESSION['phpgw_info']['expressomail']['ldap_server'] = $ldap_manager ? $ldap_manager->srcs[1] : null; $_SESSION['phpgw_info']['expressomail']['user']['email'] = $GLOBALS['phpgw']->preferences->values['email']; $_SESSION['phpgw_info']['server']['temp_dir'] = $GLOBALS['phpgw_info']['server']['temp_dir']; $preferences = $GLOBALS['phpgw']->preferences->read(); $_SESSION['phpgw_info']['user']['preferences']['expressoMail'] = $preferences['enable_local_messages']; $_SESSION['phpgw_info']['user']['preferences']['expressoMail'] = $preferences['expressoMail']; $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['voip_enabled'] = $voip_enabled; $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['voip_email_redirect'] = $emailVoip; $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['outoffice'] = $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['outoffice']; $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['telephone_number'] = $GLOBALS['phpgw_info']['user']['telephonenumber']; $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['use_cache'] = $current_config['expressoMail_enable_cache']; $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['use_x_origin'] = $current_config['expressoMail_use_x_origin']; $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['number_of_contacts'] = $current_config['expressoMail_Number_of_dynamic_contacts'] ? $current_config['expressoMail_Number_of_dynamic_contacts'] : "0"; $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['notification_domains'] = $current_config['expressoMail_notification_domains']; $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['googlegears_url'] = $current_config['expressoMail_googlegears_url']; $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['use_assinar_criptografar'] = $GLOBALS['phpgw_info']['server']['use_assinar_criptografar'] ? $GLOBALS['phpgw_info']['server']['use_assinar_criptografar'] : "0"; $_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"; $_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"; $_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"; $_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"; $_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"; $_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"; $_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"; $_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'); $_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"; $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['imap_max_folders'] = $current_config['expressoMail_imap_max_folders']; $_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"; $_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'; $_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"; $_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"; $_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"; $_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; //SpellChecker if($_SESSION['phpgw_info']['user']['preferences']['expressoMail']['use_SpellChecker'] !='0'){ echo ''; echo ''; echo ' '; } $template = CreateObject('phpgwapi.Template',PHPGW_APP_TPL); $template->set_var("txt_loading",lang("Loading")); $template->set_var("txt_clear_trash",lang("message(s) deleted from your trash folder.")); $template->set_var("new_message", lang("New Message")); $template->set_var("lang_inbox", lang("Inbox")); $template->set_var("refresh", lang("Refresh")); $template->set_var("tools", lang("Tools")); $template->set_var("lang_Open_Search_Window", lang("Open search window") . '...'); $template->set_var("lang_search_user", lang("Search user") . '...'); $template->set_var("upload_max_filesize",ini_get('upload_max_filesize')); $template->set_var("msg_folder",$_GET['msgball']['folder']); $template->set_var("msg_number",$_GET['msgball']['msgnum'] ? $_GET['msgball']['msgnum'] : $_GET['to']); $template->set_var("user_email",$_SESSION['phpgw_info']['expressomail']['user']['email']); $acc = CreateObject('phpgwapi.accounts'); $template->set_var("user_organization", $acc->get_organization($GLOBALS['phpgw_info']['user']['account_dn'])); $template->set_var("cyrus_delimiter",$_SESSION['phpgw_info']['expressomail']['email_server']['imapDelimiter']); // Fix problem with cyrus delimiter changes in preferences. // Dots in names: enabled/disabled. $save_in_folder = @eregi_replace("INBOX/", "INBOX".$_SESSION['phpgw_info']['expressomail']['email_server']['imapDelimiter'], $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['save_in_folder']); $save_in_folder = @eregi_replace("INBOX.", "INBOX".$_SESSION['phpgw_info']['expressomail']['email_server']['imapDelimiter'], $save_in_folder); $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['save_in_folder'] = $save_in_folder; // End Fix. $template->set_file(Array('expressoMail' => 'index.tpl')); $template->set_block('expressoMail','list'); $template->pfp('out','list'); $GLOBALS['phpgw']->common->phpgw_footer(); $_SESSION['phpgw_info']['server']['expressomail']['expressoMail_enable_log_messages'] = $current_config['expressoMail_enable_log_messages']; // Begin Set Anti-Spam options. $_SESSION['phpgw_info']['server']['expressomail']['expressoMail_command_for_ham'] = $current_config['expressoMail_command_for_ham']; $_SESSION['phpgw_info']['server']['expressomail']['expressoMail_command_for_spam'] = $current_config['expressoMail_command_for_spam']; $_SESSION['phpgw_info']['server']['expressomail']['expressoMail_use_spam_filter'] = $current_config['expressoMail_use_spam_filter']; echo ''; // End Set Anti-Spam options. // Set Imap Folder names options $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultTrashFolder'] = $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultTrashFolder'] ? $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultTrashFolder'] : lang("Trash"); $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultDraftsFolder'] = $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultDraftsFolder'] ? $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultDraftsFolder'] : lang("Drafts"); $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultSpamFolder'] = $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultSpamFolder'] ? $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultSpamFolder'] : lang("Spam"); $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultSentFolder'] = $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultSentFolder'] ? $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultSentFolder'] : lang("Sent"); // gera paramero com tokens suportados .... $var_tokens = ''; for($ii = 1; $ii < 11; $ii++) { if($GLOBALS['phpgw_info']['server']['test_token' . $ii . '1']) $var_tokens .= $GLOBALS['phpgw_info']['server']['test_token' . $ii . '1'] . ','; } if(!$var_tokens) { $var_tokens = 'ePass2000Lx;/usr/lib/libepsng_p11.so,ePass2000Win;c:/windows/system32/ngp11v211.dll'; } echo ''; // End Set Imap Folder names options //User info echo ""; $obj = createobject("expressoMail1_2.functions"); // setting timezone preference $zones = $obj->getTimezones(); $_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)); // este arquivo deve ser carregado antes que // os demais pois nele contem a função get_lang // que é utilizada em diversas partes echo $obj -> getFilesJs("js/common_functions.js",$update_version); include("inc/load_lang.php"); // INCLUDE these JS Files: if ($_SESSION['phpgw_info']['user']['preferences']['expressoMail']['use_local_messages']) echo ""; echo ''; $scripts = "js/abas.js," . "js/main.js," . "js/drag_area.js," . "js/draw_api.js,"; if($_SESSION['phpgw_info']['user']['preferences']['expressoMail']['use_local_messages']) $scripts .= "js/local_messages.js,"; $scripts .= "js/messages_controller.js," . "js/DropDownContacts.js," . "js/doiMenuData.js," . "js/connector.js"; echo $obj -> getFilesJs($scripts,$update_version); echo ''; if ($GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['use_shortcuts']) { echo $obj -> getFilesJs("js/shortcut.js", $update_version); } // Get Preferences or redirect to preferences page. $GLOBALS['phpgw']->preferences->read_repository(); //print_r($_SESSION['phpgw_info']['user']['preferences']['expressoMail']); unset($_SESSION['phpgw_info']['expressomail']['user']['preferences']); unset($_SESSION['phpgw_info']['expressomail']['user']['acl']); unset($_SESSION['phpgw_info']['expressomail']['user']['apps']); unset($_SESSION['phpgw_info']['expressomail']['server']['global_denied_users']); unset($_SESSION['phpgw_info']['expressomail']['server']['global_denied_groups']); ?>