Folge dem Video um zu sehen, wie unsere Website als Web-App auf dem Startbildschirm installiert werden kann.
Anmerkung: Diese Funktion ist in einigen Browsern möglicherweise nicht verfügbar.
<?php
require("./lib/config.php");
$action = $_REQUEST['action'];
if($action == '') {
$mailer = $db->query_first("SELECT COUNT(*) usermail FROM mitglieder WHERE newsletter='1'");
$maile = $mailer['usermail'];
$i = 0;
$sql = $db->query("SELECT usermail FROM mitglieder WHERE newsletter='1'");
$addresses = array();
while($mails = $db->fetch_array($sql)) {
$mail = $mails['usermail'];
$addresses[] = $mail;
$username = $mails['username'];
/*
if($i == 0 AND !empty($mail)) {
$empfaenger = $mail;
} else if($i > 0 AND !empty($mail)) {
$empfaenger = ', '.$mail;
}
$i++;
*/
}
//echo join(', ', $addresses);
if($_POST['send_newsletter']) {
if($_POST['newsletter_msg'] != '') {
$n_message = $_POST['newsletter_msg'];
$n_message = stripslashes($n_message);
$n_message = htmlspecialchars($n_message); //HTML sperren
// Newsletter Code
$n_message = str_replace("{username}","$username",$n_message);
$n_message = str_replace("{sitename}","WMS - Website Management System",$n_message);
$n_message = str_replace("{link}","http://cms.farmgame.de",$n_message);
$n_message = preg_replace("/\{modul\=(.*)\}/isU","http://cms.farmgame.de/$1", $n_message);
//$n_message = nl2br($n_message);
$betreff = 'Test Betreff';
$headers = 'From: info@farmgame.de';
mail($adresses, $betreff, $n_message, $headers);
$finish = "Newsletter an alle Empfänger gesendet!";
//echo '<meta content="4 URL=newsletter.php?sid='.$sid.'" http-equiv="refresh" />';
} else {
$error = "Sie sollten keinen Leeren Newsletter raus schicken!";
}
}
eval("\$tpl->output(\"".$tpl->get("acp_newsletter")."\");");
}
?>
$addresses = array();
while( $mails = $db->fetch_array($sql) ) {
$addresses[] = '"'.$mails['username'].'" <'.$mails['usermail'].'>';
}
$addresses = join(', ', $addresses);
<?php
require("./lib/config.php");
$action = $_REQUEST['action'];
if($action == '') {
$mailer = $db->query_first("SELECT COUNT(*) usermail FROM mitglieder WHERE newsletter='1'");
$maile = $mailer['usermail'];
$i = 0;
$email_adressen = array();
$sql = $db->query("SELECT usermail FROM mitglieder WHERE newsletter='1'");
while($mails = $db->fetch_array($sql)) {
$email_adressen[] = '"'.$mails['username'].'" <'.$mails['usermail'].'>';
$mail = $mails['usermail'];
$username = $mails['username'];
}
$email_in_array = join(', ', $email_adressen);
if($_POST['send_newsletter']) {
if($_POST['newsletter_msg'] != '' || $_POST['betreff'] != '') {
$n_message = $_POST['newsletter_msg'];
$betreff = $_POST['betreff'];
$n_message = stripslashes($n_message);
$n_message = htmlspecialchars($n_message); //HTML sperren
$betreff = stripslashes($betreff);
$betreff = htmlspecialchars($betreff); //HTML sperren
// Newsletter Code
$n_message = str_replace("{username}","$username",$n_message);
$n_message = str_replace("{sitename}","WMS - Website Management System",$n_message);
$n_message = str_replace("{link}","http://cms.farmgame.de",$n_message);
$n_message = preg_replace("/\{modul\=(.*)\}/isU","http://cms.farmgame.de/$1", $n_message);
//$betreff = "Newsletter ".date("d.m.Y", time());
//$n_message = nl2br($n_message);
foreach($email_adressen as $email)
{
mail($email, $betreff, $n_message, "from:info@farmgame.de\r\n");
//echo "Mail an $email wurde verschickt <br>";
}
//mail($adresses, $betreff, $n_message);
$finish = "Newsletter an alle Empfänger gesendet!";
echo '<meta content="3 URL=newsletter.php?sid='.$sid.'" http-equiv="refresh" />';
} else {
$error = "Sie sollten keinen Leeren Newsletter raus schicken!";
}
}
eval("\$tpl->output(\"".$tpl->get("acp_newsletter")."\");");
}
?>