X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;ds=sidebyside;f=plugins%2Ftranslate%2Foptions.php;h=7974d6ff02c612bff90d4bd9c000fa274cf87782;hb=300ea85431defdabaa4c06bec1776790e096eb78;hp=3697c66aaa5b2dfa18f950de425dd1a0e9e7a177;hpb=76911253eb850bacde3d86c8cb7b4af072e67ebe;p=squirrelmail.git
diff --git a/plugins/translate/options.php b/plugins/translate/options.php
index 3697c66a..7974d6ff 100644
--- a/plugins/translate/options.php
+++ b/plugins/translate/options.php
@@ -3,170 +3,79 @@
/**
* options.php
*
- * Copyright (c) 1999-2003 The SquirrelMail Project Team
- * Licensed under the GNU GPL. For full terms see the file COPYING.
- *
* Pick your translator to translate the body of incoming mail messages
*
- * $Id$
+ * @copyright © 1999-2007 The SquirrelMail Project Team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
+ * @version $Id$
+ * @package plugins
+ * @subpackage translate
*/
-/* 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 . 'include/load_prefs.php');
-
- displayPageHeader($color, 'None');
-
- if (isset($_POST['submit_translate']) && $_POST['submit_translate'] ) {
- if (isset($_POST['translate_translate_server'])) {
- setPref($data_dir, $username, 'translate_server', $_POST['translate_translate_server']);
- } else {
- setPref($data_dir, $username, 'translate_server', 'babelfish');
- }
-
- if (isset($_POST['translate_translate_location'])) {
- setPref($data_dir, $username, 'translate_location', $_POST['translate_translate_location']);
- } else {
- setPref($data_dir, $username, 'translate_location', 'center');
- }
-
- if (isset($_POST['translate_translate_show_read'])) {
- setPref($data_dir, $username, 'translate_show_read', '1');
- } else {
- setPref($data_dir, $username, 'translate_show_read', '');
- }
-
- if (isset($_POST['translate_translate_show_send'])) {
- setPref($data_dir, $username, 'translate_show_send', '1');
- } else {
- setPref($data_dir, $username, 'translate_show_send', '');
- }
-
- if (isset($_POST['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 '\n";
- }
-
- function ShowTrad( $tit, $com, $url ) {
+/**
+ * Include the SquirrelMail initialization file.
+ */
+require('../../include/init.php');
- echo "
$tit - ".
- $com .
- "[ $tit ]";
+/** Plugin functions */
+include_once(SM_PATH . 'plugins/translate/functions.php');
- }
+displayPageHeader($color, 'None');
?>
-
-
+
- "._("Saved Translation Options")."\n";
- }?>
-
".
- ' |