Tell a friend |
Mit diesem kleinen Modul können sie sich zum Beispiel einen Arbeitsplan erstellen, oder eine Wunschliste, oder, oder. |
So sieht´s aus |
Datei anlegen: tell.php. Hier der Quellcode |
<?php // This following statement must not be changed. // Copyright (c) Michael Bloch and Taming The Beast. // Tell-A-Friend script V 2.1 Updated September 19 2006 // Taming the Beast.net - http://www.tamingthebeast.net // Free Web Marketing and Ecommerce Resources and Tools // By using this script you agree to indemnify Taming the Beast // from from any liability that might arise from its use. // The preceding statement must not be changed. if(count($_POST)) { # This part strips out nasty code that a malicious # person may try to inject into the form foreach(array('fmail1','fmail2','fmail3','email','name') as $key) $_POST[$key] = strip_tags($_POST[$key]); if(!is_secure($_POST)) { die("Hackers begone");} # This part submits a notification to you when # the form is submitted // Email address for copies to be sent to - change to suit $emailto = "xxx@web.de"; // Notification email subject text for copies $esubject = "Das könnte interessant sein"; // Email body text for notifications $emailtext = " Hallo. $_POST[name], hat dir die Adresse ´rg.lmfd.de` gesendet. $_POST[refurl] "; # This function sends the email to you @mail("$emailto", $esubject, $emailtext, "From: $_POST[name]"); # This part is the function for sending to recipients // Page to display after successful submission // Change the thankyou.htm to suit $thankyoupage = "Danke.php"; // Subject line for the recommendation - change to suit $tsubject = "Schau dir das mal an: $_POST[refurl] "; // Change the text below for the email // Be careful not to change anyt "$_POST[value]" bits $ttext = " Hi, Ich habe die Webadresse: [rg.lmfd.de] gefunden. Es geht um die Gründung einer Rentnergewerkschaft. Sehr interessant. Schau mal rein. Gruß $_POST[name] $_POST[refurl] "; # This sends the note to the addresses submitted @mail("$_POST[fmail1],$_POST[fmail2],$_POST[fmail3]", $tsubject, $ttext, "FROM: $_POST[name]"); # After submission, the thank you page header("Location: $thankyoupage"); exit; } # Nothing further can be changed. Leave the below as is function is_secure($ar) { $reg = "/(Content-Type|Bcc|MIME-Version|Content-Transfer-Encoding)/i"; if(!is_array($ar)) { return preg_match($reg,$ar);} $incoming = array_values_recursive($ar); foreach($incoming as $k=>$v) if(preg_match($reg,$v)) return false; return true; } function array_values_recursive($array) { $arrayValues = array(); foreach ($array as $key=>$value) { if (is_scalar($value) || is_resource($value)) { $arrayValues[] = $value; $arrayValues[] = $key; } elseif (is_array($value)) { $arrayValues[] = $key; $arrayValues = array_merge($arrayValues, array_values_recursive($value)); } } return $arrayValues; } ?> |
Datei anlegen: tellck.php. Hier der Quellcode |
<html> <head> <script language="javascript"> function reset() { document.tellafriend.name.value=""; document.tellafriend.email.value=""; document.tellafriend.fmail1.value=""; document.tellafriend.fmail2.value=""; document.tellafriend.fmail3.value=""; } function validate() { if (document.tellafriend.fmail1.value.length==0) { alert("Oops! Du must die email addresse eines Freundes eingeben!"); return false; } if (document.tellafriend.email.value.length==0) { alert("Oops! Du hast deine email addresse vergessen"); return false; } if (document.tellafriend.name.value.length==0) { alert("Oops! Du hast deinen Namen vergessen"); return false; } document.tellafriend.submit() return true; } </script> <style type="text/css">Hier nichts</style> </head> <body > <table cellpadding="0" cellspacing="0" align="center" style="width: 60%"> <tr valign="top"> <td valign="middle" align="center"> <? $refurl = $_SERVER['HTTP_REFERER']; ?><? print $refurl;?><form name="tellafriend" action="Tell.php" method="post" onsubmit="return checkfields()"> <div align="center"> <center> <table border="0" cellpadding="10" cellspacing="0"> <tr><td>*Ihr Name:</td> <td><input size="30" name="name" maxlength="45"></td></tr> <tr><td>*Ihre Emailadresse:</td><td><input size="30" name="email" maxlength="45"></td></tr> <tr><td colspan="2"><p align="center"> <p align="center">Geben Sie eine oder mehrere Emailaddressen ein, <br/>an wen Sie die Empfehlung Weiterleiten wollen:</td></tr> <tr><td>*Email 1:</td><td><input size="30" name="fmail1" maxlength="50"></td></tr> <tr><td>Email 2:</td><td><input size="30" name="fmail2" maxlength="50"></td></tr> <tr><td>Email 3:</td><td><input size="30" name="fmail3" maxlength="50"></td></tr> <tr><td colspan="2"><p align="center"> <p align="center">Die E-Mail, die gesendet wird, enthält Ihren Namen und Ihre E-Mail-Adresse.<p align="center"> <br> <input onclick="validate();" type="button" value="Absenden"> <input type=hidden name=refurl value="<? print $refurl;?>"> </td></tr> </table></center></div></form> </body> </html> |
Kontakt Datenschutz Impressum |
|