KegelSoft PC-Spiel

Beta-Tester Anmeldung

\n"); } } } ######## php functions ######## ######################## #function PrintForm #This function prints the HTML input form. ######################## function PrintForm() { global $users_email, $anrede, $vorname, $nachname, $profil, $adresse, $plz, $ort, $telefon, $alter; ?>
 
 
  * Anrede:  
  * Vorname:  
  * Nachname:  
  * Profil:  
     Adresse:  
  * Land:  
  * Plz:  
  * Ort:  
     Telefon:  
  * Email:  
  * Alter:  
   


\n"); $error = 1; } if ($anrede == "") { echo ("Sie haben Feld Anrede: nicht ausgefüllt.

\n"); $error = 1; } if ($vorname == "") { echo ("Sie haben Feld Vorname: nicht ausgefüllt.

\n"); $error = 1; } if ($nachname == "") { echo ("Sie haben Feld Nachname: nicht ausgefüllt.

\n"); $error = 1; } if ($plz == "") { echo ("Sie haben Feld Plz: nicht ausgefüllt.

\n"); $error = 1; } if ($ort == "") { echo ("Sie haben Feld Ort: nicht ausgefüllt.

\n"); $error = 1; } if (!preg_match("/[0-9]/", $alter) ) { echo ("Sie haben Feld Alter: nicht ausgefüllt.

\n"); $error = 1; } if ((preg_match("/[\[\;\>\<\&\*\^\$\(\)\`\|\]\']/", $users_email)) ) { echo ("Folgende Zeichen im Feld Email sind nicht erlaubt: [ ; < > & * ` | ]

\n"); $error = 1; } return $error; } #check_form_data ######################## ######################## #This function returns a web page to the user confirming their email ######################## function reply_to_user() { global $users_email, $anrede, $vorname, $nachname, $profil, $adresse, $plz, $ort, $telefon, $alter; echo ("Danke für Ihre Email!

\n"); echo ("Sie haben uns folgende Informationen gesandt:
\n"); echo ("
\n"); echo ("
Anrede:$anrede

\n"); echo ("
Vorname:$vorname

\n"); echo ("
Nachname:$nachname

\n"); echo ("
Profil:$profil

\n"); echo ("
Adresse:$adresse

\n"); echo ("
Plz:$plz

\n"); echo ("
Ort:$ort

\n"); echo ("
Telefon:$telefon

\n"); echo ("
Email:$users_email

\n"); echo ("
Alter:$alter

\n"); echo ("
\n"); } #reply_to_user ######################## ######################## #This function does the work of sending the emails ######################## function send_mail() { global $DESTINATION_EMAIL, $users_email, $anrede, $vorname, $nachname, $profil, $adresse, $plz, $ort, $telefon, $alter; $msg_body = ""; $error = 0; #No error. If email could not be sent, will set to 1. $mailheaders = "From: $users_email\n"; $mailheaders .= "X-Mailer: PHP Email Script\n"; if ($users_name != "") { $msg_body .= "$users_name - "; } $msg_body .= "$users_email hat folgenden Text gesandt:\n\n"; $msg_body .= "$message\n"; $mailheaders .= "MIME-version: 1.0\n"; $mailheaders .= "Content-type: multipart/mixed; "; $mailheaders .= "boundary=\"Message-Boundary\"\n"; $mailheaders .= "Content-transfer-encoding: 7BIT\n"; $body_top = "--Message-Boundary\n"; $body_top .= "Content-type: text/plain; charset=US-ASCII\n"; $body_top .= "Content-transfer-encoding: 7BIT\n"; $body_top .= "Content-description: Mail message body\n\n"; $msg_body = $body_top . $msg_body; $msg_body .= "Anrede: $anrede\n"; $msg_body .= "Vorname: $vorname\n"; $msg_body .= "Nachname: $nachname\n"; $msg_body .= "Profil: $profil\n"; $msg_body .= "Adresse: $adresse\n"; $msg_body .= "Plz: $plz\n"; $msg_body .= "Ort: $ort\n"; $msg_body .= "Telefon: $telefon\n"; $msg_body .= "Email: $users_email\n"; $msg_body .= "Alter: $alter\n"; $msg_body .= "--Message-Boundary--\n"; if (mail(stripslashes($DESTINATION_EMAIL), $subject, $msg_body, $mailheaders)) { $error = 0; } else { $error = 1; } return !($error); } #send_mail ######################## ?>