fix listcommands template for Send form changes
[squirrelmail.git] / plugins / spamcop / spamcop.php
index f27e8b6e29172ea3cae2e1cc7f54946804ee58a4..9e9ee06416e8deefb34337ecc5e355ea4e0e7952 100644 (file)
@@ -3,7 +3,7 @@
 /**
  * spamcop.php -- SpamCop plugin -- main page
  *
- * @copyright © 1999-2006 The SquirrelMail Project Team
+ * @copyright © 1999-2007 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package plugins
@@ -23,12 +23,12 @@ include_once(SM_PATH . 'functions/imap_messages.php');
 /* plugin functions */
 include_once(SM_PATH . 'plugins/spamcop/functions.php');
 
-/* GLOBALS */
+include_once(SM_PATH . 'functions/compose.php');
 
-sqgetGlobalVar('username', $username, SQ_SESSION);
+/* GLOBALS */
 
 sqgetGlobalVar('mailbox', $mailbox, SQ_GET);
-sqgetGlobalVar('passed_id', $passed_id, SQ_GET);
+sqgetGlobalVar('passed_id', $passed_id, SQ_GET, NULL, SQ_TYPE_BIGINT);
 sqgetGlobalVar('js_web', $js_web, SQ_GET);
 
 if (! sqgetGlobalVar('startMessage', $startMessage, SQ_GET) ) {
@@ -119,7 +119,7 @@ echo "</p>";
   echo '<form method="post" action="javascript:return false">';
   echo '<input type="button" value="' . _("Close Window") . "\" onclick=\"window.close(); return true;\" />\n";
 } else {
-   ?><form method="post" action="../../src/right_main.php">
+   ?><form method="post" action="<?php echo sqm_baseuri(); ?>src/right_main.php">
   <input type="hidden" name="mailbox" value="<?php echo htmlspecialchars($mailbox) ?>" />
   <input type="hidden" name="startMessage" value="<?php echo htmlspecialchars($startMessage) ?>" />
 <?php
@@ -134,7 +134,7 @@ echo "</p>";
       $report_email = 'submit.' . $spamcop_id . '@spam.spamcop.net';
    else
       $report_email = 'quick.' . $spamcop_id . '@spam.spamcop.net';
-   $form_action = SM_PATH . 'src/compose.php';
+   $form_action = sqm_baseuri() . 'src/compose.php';
 ?>  <form method="post" action="<?php echo $form_action?>">
   <input type="hidden" name="mailbox" value="<?php echo htmlspecialchars($mailbox) ?>" />
   <input type="hidden" name="spamcop_is_composing" value="<?php echo htmlspecialchars($passed_id) ?>" />
@@ -171,4 +171,4 @@ echo "</p>";
 </tr>
 </table>
 </body>
-</html>
\ No newline at end of file
+</html>