Fix a bunch of plugins to cope with moved load_prefs/validate files.
[squirrelmail.git] / plugins / translate / options.php
index c3a6389a40ee9be9cf9961ff5f31448553148ce9..74db0b338e5d42bacc6de0ea988c98283aca623d 100644 (file)
@@ -1,26 +1,31 @@
 <?php
    /**
-    **  options.php
-    **
-    **  Pick your translator to translate the body of incoming mail messages
-    **
-    **/
-
+    * options.php
+    *
+    * Copyright (c) 1999-2002 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$
+    */
+
+   /* Path for SquirrelMail required files. */
    chdir('..');
-
-   session_start();
-   
-   require_once('../config/config.php');
-   require_once('../functions/strings.php');
-   require_once('../functions/page_header.php');
-   require_once('../functions/display_messages.php');
-   require_once('../functions/imap.php');
-   require_once('../functions/array.php');
-   require_once('../functions/i18n.php');
-   require_once('../src/load_prefs.php');
+   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 ($submit_translate) {
+    if (isset($submit_translate) && $submit_translate ) {
         if (isset($translate_translate_server)) {
             setPref($data_dir, $username, 'translate_server', $translate_translate_server);
         } else {
@@ -88,8 +93,7 @@
     }
 
 ?>
-   <br>
-   <table width=100% align=center border=0 cellpadding=2 cellspacing=0><tr><td bgcolor="<?php echo $color[0] ?>">
+   <table width="95%" align=center border=0 cellpadding=1 cellspacing=0><tr><td bgcolor="<?php echo $color[0] ?>">
       <center><b><?php echo _("Options") . ' - '. _("Translator"); ?></b></center>
    </td></tr></table>
 
    '</form>'.
 "</body></html>\n";
 
-?>
\ No newline at end of file
+?>