-/* Path for SquirrelMail required files. */
-define('SM_PATH','../../');
-
-/* SquirrelMail required files. */
-require_once(SM_PATH . 'include/validate.php');
-require_once(SM_PATH . 'functions/strings.php');
-require_once(SM_PATH . 'functions/page_header.php');
-require_once(SM_PATH . 'functions/display_messages.php');
-require_once(SM_PATH . 'functions/imap.php');
-require_once(SM_PATH . 'functions/array.php');
-require_once(SM_PATH . 'functions/i18n.php');
-require_once(SM_PATH . 'include/load_prefs.php');
-
- displayPageHeader($color, 'None');
-
- if (isset($submit_translate) && $submit_translate ) {
- if (isset($translate_translate_server)) {
- setPref($data_dir, $username, 'translate_server', $translate_translate_server);
- } else {
- setPref($data_dir, $username, 'translate_server', 'babelfish');
- }
-
- if (isset($translate_translate_location)) {
- setPref($data_dir, $username, 'translate_location', $translate_translate_location);
- } else {
- setPref($data_dir, $username, 'translate_location', 'center');
- }
-
- if (isset($translate_translate_show_read)) {
- setPref($data_dir, $username, 'translate_show_read', '1');
- } else {
- setPref($data_dir, $username, 'translate_show_read', '');
- }
-
- if (isset($translate_translate_show_send)) {
- setPref($data_dir, $username, 'translate_show_send', '1');
- } else {
- setPref($data_dir, $username, 'translate_show_send', '');
- }
-
- if (isset($translate_translate_same_window)) {
- setPref($data_dir, $username, 'translate_same_window', '1');
- } else {
- setPref($data_dir, $username, 'translate_same_window', '');
- }
- }
-
- $translate_server = getPref($data_dir, $username, 'translate_server');
- if ($translate_server == '') {
- $translate_server = 'babelfish';
- }
- $translate_location = getPref($data_dir, $username, 'translate_location');
- if ($translate_location == '') {
- $translate_location = 'center';
- }
- $translate_show_read = getPref($data_dir, $username, 'translate_show_read');
- $translate_show_send = getPref($data_dir, $username, 'translate_show_send');
- $translate_same_window = getPref($data_dir, $username, 'translate_same_window');
-
-
- function ShowOption($Var, $value, $Desc)
- {
- $Var = 'translate_' . $Var;
-
- global $$Var;
-
- echo '<option value="' . $value . '"';
- if ($$Var == $value)
- {
- echo ' SELECTED';
- }
- echo '>' . $Desc . "</option>\n";
- }
-
- function ShowTrad( $tit, $com, $url ) {