<?php
$system->error('This feature has been disabled in demo mode') if $system->config('demo');
$system->db->do('DELETE FROM emails_notices');
my $insert = $system->db->prepare('INSERT INTO emails_notices VALUES (?,?)');
foreach (grep { $_ =~ /^notice_/ && $system->param($_) > 0 } $system->param)
{
$insert->execute($system->param($_),($_ =~ /^notice_(.+)$/)[0]);
}
$insert->finish;
$system->redirect;
?>