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.
echo "GET: ";
print_r($_GET);
echo "<hr>POST: ";
print_r($_POST);
if (!isset($name) || !isset($email) || !isset($message) || empty($name) || empty($email) || empty($message))
{
print "&result=Fail";
print "&errorMsg=" . urlencode("Bitte alle Felder ausfüllen.");
exit;
}
<?
if (!isset($_POST['name']) || !isset($_POST['email']) || !isset($_POST['message']) || empty($_POST['name']) || empty($_POST['email']) || empty($_POST['message']))
{
echo "GET: ";
print_r($_GET);
echo "<hr>POST: ";
print_r($_POST);
}
$email = strtolower($email);
addentry($name, $email, $message);
function addentry($name, $email, $message)
{
$posted = strftime("%D %I:%M %p");
$message = stripslashes($message);
$file = fopen('entry.txt', 'r');
if (!$file)
{
print "&result=Fail";
print "&errorMsg=" . urlencode("Could not open entry.txt file. Change CHMOD levels to 766.");
exit;
}
$txt = '';
while(!feof($file))
{
$txt .= fgets($file);
}
fclose($file);
$addentry = "<font color=\"#6F6453\">Name:</font> $name\n<font color=\"#6F6453\">Email:</font> <font color=\"#6F6453\"><u><A href=\"mailto:$email\">$email</A></u></font><br>\n<font color=\"#6F6453\">Posted:</font> $posted\n<font color=\"#6F6453\">Message:</font> $message\n\n";
$txt = $addentry."\n".$txt; #$neuer_eintrag enthält den Neuen Eintrag, der in die Dateo geschrieben werden soll.
$file = fopen('entry.txt','w');
fwrite($file, $txt);
fclose($file);
// Send admin an email when new entry occurs
mailAdmin($name, $email, $message);
}
function mailAdmin($name, $email, $message) {
$mailTo = "jackassol@web.de";
$mailFrom = "From: <Extraweg>";
$mailSubject = "Neuer Gästebuch Eintrag";
$mailBody = "A visitor to your site has left the following information in your guestbook:\n
Name: $name
Email: $email
The visitor commented:
------------------------------
$message
------------------------------
You can view the message at:
http://www.extraweg.de";
mail($mailTo, $mailSubject, $mailBody, $mailFrom);
}
print "&result=okay";
exit;
?>
<?
echo "GET: ";
print_r($_GET);
echo "<hr>";
if (!isset($name) || !isset($email) || !isset($message) || empty($name) || empty($email) || empty($message))
{
print "&result=Fail";
print "&errorMsg=" . urlencode("Bitte alle Felder ausfüllen.");
exit;
}
$email = strtolower($email);
addentry($name, $email, $message);
function addentry($name, $email, $message)
{
$posted = strftime("%D %I:%M %p");
$message = stripslashes($message);
$file = fopen('entry.txt', 'r');
if (!$file)
{
print "&result=Fail";
print "&errorMsg=" . urlencode("Could not open entry.txt file. Change CHMOD levels to 766.");
exit;
}
$txt = '';
while(!feof($file))
{
$txt .= fgets($file);
}
fclose($file);
$addentry = "<font color=\"#6F6453\">Name:</font> $name\n<font color=\"#6F6453\">Email:</font> <font color=\"#6F6453\"><u><A href=\"mailto:$email\">$email</A></u></font><br>\n<font color=\"#6F6453\">Posted:</font> $posted\n<font color=\"#6F6453\">Message:</font> $message\n\n";
$txt = $addentry."\n".$txt; #$neuer_eintrag enthält den Neuen Eintrag, der in die Dateo geschrieben werden soll.
$file = fopen('entry.txt','w');
fwrite($file, $txt);
fclose($file);
// Send admin an email when new entry occurs
mailAdmin($name, $email, $message);
}
function mailAdmin($name, $email, $message) {
$mailTo = "jackassol@web.de";
$mailFrom = "From: <Extraweg>";
$mailSubject = "Neuer Gästebuch Eintrag";
$mailBody = "A visitor to your site has left the following information in your guestbook:\n
Name: $name
Email: $email
The visitor commented:
------------------------------
$message
------------------------------
You can view the message at:
http://www.extraweg.de";
mail($mailTo, $mailSubject, $mailBody, $mailFrom);
}
print "&result=okay";
exit;
?>
<?
if (!isset($name) || !isset($email) || !isset($message) || empty($name) || empty($email) || empty($message)) {
print "&result=Fail";
print "&errorMsg=" . urlencode("Bitte alle Felder ausfüllen.");
exit;
}
$email = strtolower($email);
addentry($name, $email, $message);
function addentry($name, $email, $message) {
$posted = strftime("%D %I:%M %p");
$message = stripslashes($message);
$file = fopen('entry.txt', 'a+');
if (!$file) {
print "&result=Fail";
print "&errorMsg=" . urlencode("Could not open entry.txt file. Change CHMOD levels to 766.");
exit;
}
fputs($file, "<font color=\"#6F6453\">Name:</font> $name\n<font color=\"#6F6453\">Email:</font> <font color=\"#6F6453\"><u><A href=\"mailto:$email\">$email</A></u></font><br>\n<font color=\"#6F6453\">Posted:</font> $posted\n<font color=\"#6F6453\">Message:</font> $message\n\n");
fclose($file);
// Send admin an email when new entry occurs
mailAdmin($name, $email, $message);
}
function mailAdmin($name, $email, $message) {
$mailTo = "123@web.de";
$mailFrom = "From: <Extraweg>";
$mailSubject = "Neuer Gästebuch Eintrag";
$mailBody = "A visitor to your site has left the following information in your guestbook:\n
Name: $name
Email: $email
The visitor commented:
------------------------------
$message
------------------------------
You can view the message at:
http://www.123.de";
mail($mailTo, $mailSubject, $mailBody, $mailFrom);
}
print "&result=okay";
exit;
?>