Ejemplo n.º 1
0
				$xoopsMailer->setToUsers($added[$i]);
			}

			$xoopsMailer->setFromName(icms_core_DataFilter::stripSlashesGPC($_POST['mail_fromname']));
			$xoopsMailer->setFromEmail(icms_core_DataFilter::stripSlashesGPC($_POST['mail_fromemail']));
			$xoopsMailer->setSubject(icms_core_DataFilter::stripSlashesGPC($_POST['mail_subject']));
			$xoopsMailer->setBody(icms_core_DataFilter::stripSlashesGPC($_POST['mail_body']));
			if (in_array("mail", $_POST['mail_send_to'])) {
				$xoopsMailer->useMail();
			}
			if (in_array("pm", $_POST['mail_send_to']) && empty($_POST['mail_inactive'])) {
				$xoopsMailer->usePM();
			}

			$xoopsMailer->send(TRUE);
			echo $xoopsMailer->getSuccess();
			echo $xoopsMailer->getErrors();

			if ($count_criteria > $limit) {
				$form = new icms_form_Theme(_AM_SENDMTOUSERS, "mailusers", "admin.php?fct=mailusers", 'post', TRUE);
				if (!empty($_POST['mail_to_group'])) {
					foreach ($_POST['mail_to_group'] as $mailgroup) {
						$group_hidden = new icms_form_elements_Hidden("mail_to_group[]", $mailgroup);
						$form->addElement($group_hidden);
					}
				}
				$inactive_hidden = new icms_form_elements_Hidden("mail_inactive", @$_POST['mail_inactive']);
				$lastlog_min_hidden = new icms_form_elements_Hidden("mail_lastlog_min", icms_core_DataFilter::checkVar($_POST['mail_lastlog_min'], 'text'));
				$lastlog_max_hidden = new icms_form_elements_Hidden("mail_lastlog_max", icms_core_DataFilter::checkVar($_POST['mail_lastlog_max'], 'text'));
				$regd_min_hidden = new icms_form_elements_Hidden("mail_regd_min", icms_core_DataFilter::checkVar($_POST['mail_regd_min'], 'text'));
				$regd_max_hidden = new icms_form_elements_Hidden("mail_regd_max", icms_core_DataFilter::checkVar($_POST['mail_regd_max'], 'text'));