cleanup some plugins to make use of sqgetGlobalVar
[squirrelmail.git] / plugins / listcommands / mailout.php
index 21be97388cb6b83bbd5757f0cc22a32fca1c490a..56b8416c4520782da4e992e3e5fa9488dded67e7 100644 (file)
@@ -2,14 +2,13 @@
 /**
  * mailout.php
  *
- * Copyright (c) 1999-2002 The SquirrelMail Project Team
+ * Copyright (c) 1999-2003 The SquirrelMail Project Team
  * Licensed under the GNU GPL. For full terms see the file COPYING.
  *
  * $Id$
  */
 
-chdir('..');
-define('SM_PATH','../');
+define('SM_PATH','../../');
 
 /* SquirrelMail required files. */
 require_once(SM_PATH . 'include/validate.php');
@@ -19,6 +18,13 @@ include_once(SM_PATH . 'functions/html.php');
 
 displayPageHeader($color, $mailbox);
 
+/* get globals */
+sqgetGlobalVar('mailbox', $mailbox, SQ_GET);
+sqgetGlobalVar('send_to', $send_to, SQ_GET);
+sqgetGlobalVar('subject', $subject, SQ_GET);
+sqgetGlobalVar('body',    $body,    SQ_GET);
+sqgetGlobalVar('action',  $action,  SQ_GET);
+
 echo html_tag('p', '', 'left' ) .
 html_tag( 'table', '', 'center', $color[0], 'border="0" width="75%"' ) . "\n" .
     html_tag( 'tr',
@@ -78,11 +84,11 @@ if ($idents != '' && $idents > 1) {
     echo $defaultmail;
 }
 
-echo '<br>'
-. '<input type=hidden name="send_to" value="' . htmlspecialchars($send_to) . '">'
-. '<input type=hidden name="subject" value="' . htmlspecialchars($subject) . '">'
-. '<input type=hidden name="body" value="' . htmlspecialchars($body) . '">'
-. '<input type=hidden name="mailbox" value="' . htmlspecialchars($mailbox) . '">'
-. '<input type=submit name="send" value="' . _("Send Mail") . '"><BR><BR></CENTER>'
-. '</form></TD></TR></TABLE></P></BODY></HTML>';
+echo '<br />'
+. '<input type="hidden" name="send_to" value="' . htmlspecialchars($send_to) . '">'
+. '<input type="hidden" name="subject" value="' . htmlspecialchars($subject) . '">'
+. '<input type="hidden" name="body" value="' . htmlspecialchars($body) . '">'
+. '<input type="hidden" name="mailbox" value="' . htmlspecialchars($mailbox) . '">'
+. '<input type="submit" name="send" value="' . _("Send Mail") . '"><br /><br /></center>'
+. '</form></td></tr></table></p></body></html>';
 ?>