Happy New Year
[squirrelmail.git] / plugins / spamcop / options.php
index f30987ad46b9a27141c63410a89ddeeb65a203dd..6f1c407aebdd0da58d32457d4d5a668a2a9c4230 100755 (executable)
@@ -3,7 +3,7 @@
 /**
  * options.php -- SpamCop options page
  *
- * @copyright © 1999-2007 The SquirrelMail Project Team
+ * @copyright 1999-2018 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package plugins
@@ -18,7 +18,7 @@ require('../../include/init.php');
 /* plugin functions */
 include_once(SM_PATH . 'plugins/spamcop/functions.php');
 
-displayPageHeader($color, 'None');
+displayPageHeader($color);
 
 /** is spamcop plugin disabled */
 // option changes do nothing, if read_body_header_right hook is not active.
@@ -117,19 +117,19 @@ spamcop_load_function();
                     echo ">"._("Quick email-based reporting");
                     echo '</option>';
                 }
-              ?>
-              <option value="thorough_email"
-                <?php
-                  if ($spamcop_method == 'thorough_email') echo ' selected="selected"';
-                  echo ">"._("Thorough email-based reporting");
-                ?>
-              </option>
-              <option value="web_form"
-                <?php
-                  if ($spamcop_method == 'web_form') echo ' selected="selected"';
-                  echo ">"._("Web-based form");
-                ?>
-              </option>
+                   $selected = '';
+                   if ($spamcop_method == 'thorough_email') {
+                       $selected = ' selected';
+                   }
+                   echo sprintf('            <option value="thorough_email"%s>%s</option>',$selected, _("Through email-based reporting"));
+                   
+                   $selected = '';
+                   if ($spamcop_method == 'web_form') {
+                       $selected = ' selected';
+                   }
+                   echo sprintf('            <option value="web_form"%s>%s</option>', $selected, _("Web-based form"));
+                
+            ?>
             </select>
             <input type="hidden" name="action" value="meth" />
             <?php
@@ -143,7 +143,7 @@ spamcop_load_function();
             '<small>(' . _("see below") . ')</small>','right','','valign="top"');
           ?>
           <td valign="top"><form method="post" action="options.php">
-            <input type="text" size="30" name="ID" value="<?php echo htmlspecialchars($spamcop_id) ?>" />
+            <input type="text" size="30" name="ID" value="<?php echo sm_encode_html_special_chars($spamcop_id) ?>" />
             <input type="hidden" name="action" value="save_id" />
             <?php
               echo '<input type="submit" value="' . _("Save ID") . "\" />\n";
@@ -194,4 +194,4 @@ echo '<p><b>' . _("More information") . '</b><br />';
 printf(_("For more information about SpamCop, it's services, spam in general, and many related topics, try reading through SpamCop's %sHelp and Feedback%s section."), '<a href="http://spamcop.net/help.shtml">', '</a>');
 echo "</p>\n";
 ?>
-</body></html>
\ No newline at end of file
+</body></html>