<?php
// $Id: purge.inc.php,v 1.5 2005/09/28 22:28:56 perlstalker Exp $
if (!defined('SM_PATH')) { define('SM_PATH' , '../../'); }

include_once(SM_PATH.'include/validate.php');
include_once(SM_PATH.'functions/page_header.php');
include_once(SM_PATH.'include/load_prefs.php');
include_once(SM_PATH.'plugins/sasql/sasql_conf.php');
include_once(SM_PATH.'plugins/sasql/sasql_api.php');

sqgetGlobalVar('purge_spam', $purge_spam, SQ_FORM);

if ($purge_spam) {
  sasql_purgeSpam();
}

?>

<table width="100%" border="0" cellpadding="1" cellspacing="1">
 <tr>
  <td align="center" bgcolor="<?php echo $color[4]; ?>">
   <b><?php printf (_("Purge %s Folder"), $spam_folder); ?></b>
  </td>
 </tr>
 <tr>
  <td align="center" bgcolor="<?php echo $color[4]; ?>">
   <form name='sasql_purge' action='sasql_options.php' method='Post'>
<?php
echo '<input type="submit" name="purge_spam" value="';
echo _("Purge");
echo '"/>';
?>
    <?php echo sprintf(_("Delete all messages from your %s folder."),
		       $spam_folder); ?>
   </form>
   <p>
    <b><?php echo _("Note")?>:</b>
    <?php echo sprintf(_("Your %s folder may be unavailable during the purge. It will become available again when the purge is complete."), $spam_folder); ?>
   </p>
  </td>
 </tr>
</table>
