break; case 'maint': // Perform any maintenance actions required if (isset($_POST['email_dross'])) { if ($mailAdmin->dbTidy()) { $mes->addSuccess(LAN_MAILOUT_184); } else { $errors[] = LAN_MAILOUT_183; } } break; // Send Emails Immediately using Ajax // Send Emails Immediately using Ajax case 'mailsendimmediately': $id = array_keys($_POST['mailaction']); sendImmediately($id[0]); break; default: // $mes->addError('Code malfunction 23! ('.$action.')'); // $ns->tablerender(LAN_MAILOUT_97, $mes->render()); exit; // Could be a hack attempt } // switch($action) - end of 'executive' tasks // ------------------------ Intermediate actions --------------------------- // (These have more than one route to trigger them) switch ($midAction) { case 'midDeleteEmail': // $emessage->add($pageMode.': Would delete here: '.$mailId, E_MESSAGE_SUCCESS); // break; // Delete this $result = $mailAdmin->deleteEmail($mailId, 'all');
if (isset($_POST['mail_earliest_time'])) { $first = e107::getDateConvert()->decodeDateTime($_POST['mail_earliest_time'], 'datetime', CORE_DATE_ORDER, FALSE); } if (isset($_POST['mail_latest_time'])) { $last = e107::getDateConvert()->decodeDateTime($_POST['mail_earliest_time'], 'datetime', CORE_DATE_ORDER, TRUE); } if ($mailAdmin->activateEmail($mailId, FALSE, $notify, $first, $last)) { $emessage->add(LAN_MAILOUT_185, E_MESSAGE_SUCCESS); $admin_log->log_event('MAIL_06', 'ID: ' . $mailId, E_LOG_INFORMATIVE, ''); } else { $errors[] = str_replace('--ID--', $mailId, LAN_MAILOUT_188); } break; } if (isset($_POST['email_sendnow'])) { sendImmediately($mailId); } // --------------------- Display errors and results ------------------------ if (is_array($errors) && count($errors) > 0) { foreach ($errors as $e) { $emessage->add($e, E_MESSAGE_ERROR); } unset($errors); } if ($emessage->hasMessage()) { $ns->tablerender(LAN_MAILOUT_97, $emessage->render()); } // ---------------------- Display required page ---------------------------- // At this point $action determines which page display is required - one of a // fairly limited number of choices $mailAdmin->newMode($action);