include("inc/db.inc.php"); $division = "Home"; $fehler = "false"; // WitzKategorien auslesen $query_kategorie = "SELECT kategorie_id, kategorie_wert from kategorie"; $result_kategorie = mysql_query($query_kategorie); // Anzahl der Witze auslesen $resultID = mysql_query("SELECT COUNT(witz_id) FROM witz where witz_online != 0"); $witz_total = mysql_result($resultID,0); // Anzahl der Bilder auslesen $resultID = mysql_query("SELECT COUNT(bild_id) FROM bild where bild_online != 0"); $bild_total = mysql_result($resultID,0); // Anzahl der Newsletterabonnenten auslesen $newsletterID = mysql_query("SELECT COUNT(nl_id) FROM nl where status = 1"); $newsletter_total = mysql_result($newsletterID,0); // Zufallswitz auslesen $query_zufallswitze = "SELECT witz_text FROM witz ORDER BY RAND() LIMIT 1"; $result_zufallswitze = mysql_query($query_zufallswitze); if ($status == "senden") { if (($name != "") && ($name != "dein Name") && ($nachricht != "") && ($nachricht != "deine Nachricht")) { // E-Mail--------------------- //Wird vom Formular ausgefuellt $email_to = "$name<$email>"; //Absender-Email $email_from_mail = $name; //Absender-Name $email_from_name = $email; //Betreff in der Mail $email_betreff = "Info von www.spass-team.de"; //CC $email_to_cc=""; $header="From:$email_from_name<$email_from_mail>\n"; $header .= "Cc: $email_to_cc\n"; mail("webmaster@spass-team.de",$email_betreff,$nachricht,$header); header("Location: kontakt_danke.php"); } else { $fehler = "true"; } } echo ""; ?>