$config from php.ini needs to be '" . $php_ini[$config] . "', but is set to '" . $f_phpini . "'.
";
}
}
if ($error)
exit;
/* End: Check config needed for expressoMail */
$GLOBALS['phpgw_info']['flags'] = array(
'noheader' => False,
'nonavbar' => False,
'currentapp' => 'expressoMail1_2',
'update_version' => '1.233',
'enable_nextmatchs_class' => True
);
include('../header.inc.php');
$update_version = $GLOBALS['phpgw_info']['flags']['update_version'];
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;
}
}
}
// 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']['user']['preferences']['expressoMail'] = array(
'voip_enabled' => $voip_enabled,
'voip_email_redirect' => $emailVoip,
'outoffice' => $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['outoffice'],
'telephone_number' => $GLOBALS['phpgw_info']['user']['telephonenumber'],
'max_email_per_page' => $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['max_email_per_page'],
'save_deleted_msg' => $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['save_deleted_msg'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['save_deleted_msg'] : "0",
'delete_trash_messages_after_n_days'=> $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['delete_trash_messages_after_n_days'],
'delete_and_show_previous_message' => $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['delete_and_show_previous_message'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['delete_and_show_previous_message'] : "0",
'alert_new_msg' => $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['alert_new_msg'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['alert_new_msg'] : "0",
'mainscreen_showmail' => $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['mainscreen_showmail'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['mainscreen_showmail'] : "0",
'signature' => $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['signature'],
'type_signature' => $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['type_signature'],
'use_signature' => $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['use_signature'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['use_signature'] : "0",
'hide_folders' => $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['hide_folders'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['hide_folders'] : "0",
'save_in_folder' => $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['save_in_folder'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['save_in_folder'] : "-1",
'line_height' => $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['line_height'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['line_height'] : "30",
'font_size' => $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['font_size'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['font_size'] : "11",
'use_shortcuts' => $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['use_shortcuts'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['use_shortcuts'] : "0",
'auto_save_draft' => $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['auto_save_draft'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['auto_save_draft'] : "0",
'use_dynamic_contacts' => $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['use_dynamic_contacts'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['use_dynamic_contacts'] : "0",
'number_of_contacts' => $current_config['expressoMail_Number_of_dynamic_contacts'] ? $current_config['expressoMail_Number_of_dynamic_contacts'] : "0",
'use_cache' => $current_config['expressoMail_enable_cache'],
'notification_domains' => $current_config['expressoMail_notification_domains'],
'remove_attachments_function' => $current_config['expressoMail_remove_attachments_function'],
'use_important_flag' => $current_config['expressoMail_enable_important_flag']
);
$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");
echo '';
// End Set Imap Folder names options
$obj = createobject("expressoMail1_2.functions");
include("inc/load_lang.php");
// INCLUDE these JS Files:
echo $obj -> getFilesJs("js/abas.js," .
"js/common_functions.js," .
"js/doiMenuData.js," .
"js/drag_area.js," .
"js/draw_api.js," .
"js/DropDownContacts.js," .
"js/InfoContact.js," .
"js/main.js," .
"js/rich_text_editor.js," .
"js/wfolders.js,",
$GLOBALS['phpgw_info']['flags']['update_version']);
if ($GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['use_shortcuts'])
{
echo $obj -> getFilesJs("js/shortcut.js", $GLOBALS['phpgw_info']['flags']['update_version']);
}
// Get Preferences or redirect to preferences page.
$GLOBALS['phpgw']->preferences->read_repository();
if ($GLOBALS['phpgw_info']['user']['preferences']['expressoMail'] == null){
echo '';
echo "";
}
?>