function addNotices($id)
{
global $pommo;
$logger =& Pommo::$_logger;
$dbo =& Pommo::$_dbo;
if (!is_numeric($id)) {
return;
}
$notices = array();
$i = 0;
foreach ($logger->getAll() as $n) {
$i++;
$notices[] = $dbo->prepare("(%i,'%s', %i)", array($id, $n, $i));
}
// update DB notices
if (!empty($notices)) {
$query = "\n\t\t\t\tINSERT INTO " . $dbo->table['mailing_notices'] . "\n\t\t\t\t(mailing_id,notice,id) VALUES " . implode(',', $notices);
$dbo->query($query);
}
// trim notices
Pommo_Mail_Ctl::delNotices($id);
}