\n"); echo("\n"); echo("ALCATech\n"); require "tools/headers.php"; if ($norebuild != true) echo("\n\n"); // das zeugs was in den gehört laden require "tools/body-stuff.php"; if (getenv(HTTP_X_FORWARDED_FOR)){ $ip=getenv(HTTP_X_FORWARDED_FOR); } else { $ip=getenv(REMOTE_ADDR); } require "tools/dbconnect.php"; if ($lang=="en") $active = 1; if ($lang=="de") $active = 2; //if ($lang=="es") $active = 3; // default language is english if ($active == 0) $active = 1; if ($active == 1) $printout = " Here you have the option to enter your email address and you will be added to the ALCATech Mailing List. After submitting this form you will receive a acknowledgement email with an Link to confirm your subscription. You will receive from time to time up to date information about updates, ALCATech product news and furthermore tested and recommended sound cards from selected manufacturers. Your email address is exclusively used for this purpose and will not be made available, rented or sold to any third party. "; if ($active == 2) $printout =" Hier haben Sie die Moeglichkeit, sich mit Ihrer email-Adresse fuer die ALCATech Mailingliste anzumelden. Nach Absenden dieses Formulares erhalten Sie eine Bestaetigungsmail in der ein Link enthalten ist um Sie endgueltig einzutragen. Sie erhalten dann aktuelle Informationen ueber Updates und Neuerungen der ALCATech Produkte und der getesteten und empfohlenen Soundkarten ausgewaehlter Hersteller. Ihre email-Adresse wird ausschliesslich fuer diese Zwecke verwendet und nicht an Dritte weitergegeben!
"; // does someone sent his mail-addy ? if ($email) { //require "tools/dbconnect.php"; if (!mysql_query($query,$link)) die("
can not connect to the db server :// "); // first we have to check if the user is already 'member' $query = "select id from mlist where email = \"$email\" or UID=\"id\""; $res = mysql_query($query,$link); $rows= mysql_num_rows($res); if ($rows == 0) { // neat, a new member, generade an unique ID and add him/her $query = "select hex(rand()*99999999999999)"; $res = mysql_query($query,$link); $d = mysql_fetch_row($res); $rid = $d[0]; $query = "insert into mlist (email,UID,datum_sign,ip,active) values (\"$email\",\"$d[0]\",now(),\"$ip\",0)"; $res = mysql_query($query,$link); // send mail ... if ($active == 1) mail($email,"ALCATech Mailinglist", "Dear Ladies and Gentleman,\n\nYou requested to join our mailing list with\nthe email address $email.\n\nClick on the link below to finally join our list.\n\nhttp://www.alcatech.de/html/mailing_list.php?email=1&id=$rid&lang=en\n\n\nTo unsubscribe from our list, just visit the link below.\n\nhttp://www.alcatech.de/html/mailing_unsubscribe.php?email=$email&lang=en\n\n\nIf you think you didn't subscribe to our list\njust ignore this email, You won't get anymore mails\nfrom our list.\n\n\nYour ALCATech Mailing list manager\n", "From: mailinglist@alcatech.de\n"); if ($active == 2) mail($email,"ALCATech Mailinglist", "Sehr geehrte Damen und Herren,\n\nSie haben sich mit Ihrer email-Adresse zur\nBPM Studio Mailingliste angemeldet. Bitte\nklicken Sie auf den folgenden Link um diese\nListe zu abonieren:\n\nhttp://www.alcatech.de/html/mailing_list.php?email=1&id=$rid&lang=de\n\nSie koennen sich jederzeit wieder aus dieser\nListe austragen indem Sie folgende Seite\nbesuchen.\n\nhttp://www.alcatech.de/html/mailing_unsubscribe.php?email=$email&lang=de\n\nWenn Sie der Meinung sind dass Sie diese Mail\nunbeabsichtigt oder unbestellt erhalten haben\ndann ignorieren Sie diese einfach. Sie werden\ndann keine weiteren emails erhalten.\n\n\nIhr ALCATech Mailinglistenmanager ", "From: mailinglist@alcatech.de\n"); if ($active == 2) $printout = "Vielen Dank fuer Ihre Anmeldung. Wir haben eine Bestaetigungsmail an $email gesendet. Bitte ueberpruefen Sie Ihren Posteingang auf neue Nachrichten und klicken Sie auf den Link in der Mail mit dem Absender \"mailinglist@alcatech.de\" um sich endgueltig in die Liste einzutragen.
"; if ($active == 1) $printout =" Many thanks for you registration. Wir have send a confirmation mail to $email . Please check your Mailbox for new messages and click on the link in the mail with the sender \"mailinglist@alcatech.de\" in order to finally join the list.
"; } else { // yep, its already a member, was an id sent ? remove him/her ... if ($id) { // there is an ID, user wants to confirm its entry ... $query = "update mlist set active=$active,datum_join=now() where UID=\"$id\""; //printf("update mlist set active=$active,datum_join=now() where UID=\"$id\""); //exit; $res = mysql_query($query,$link); $query = "select active from mlist where UID=\"$id\""; $res = mysql_query($query,$link); $num_rows = mysql_num_rows($res); //if (mysql_affected_rows($res)) { if($num_rows != 0) { if ($active == 1) $printout = "The email address was added to the mailing list
"; if ($active == 2) $printout = "Die Mailadresse wurde in die Mailingliste aufgenommen
"; } else { if ($active == 1) $printout="Sorry, can't add your eMail Address, try again later ...
"; if ($active == 2) $printout="Die Mailadresse konnte nicht aufgenommen werden, versuchen Sie sich erneut anzumelden
"; } } else { // no id ? then the user wants to unsubscribe ? // we should make sure our member really wants to quit ... if (!$sure) { // create 'exit' page , set sure to 1 if ($active == 1) $printout = "The email address $email was already added to the mailing list, click here if you want to unsubscribe from the mailing list.
"; if ($active == 2) $printout = "Die Mailadresse $email ist bereits in der Mailingliste vorhanden Klicken Sie hier wenn Sie sich aus der Mailingsliste austragen wollen.
"; } else { // user confirmd removing him/her self $query = "delete from mlist where email=\"$email\""; $res = mysql_query($query,$link); if ($active == 1) $printout = "The email address $email has been removed.
"; if ($active == 2) $printout = "Die Mailadresse $email wurde aus der Mailingliste entfernt.
"; if ($ma) { if ($active == 1) mail($email,"ALCATech Mailinglist", "Dear Sir or Madam, unfortunate you decided to unsubscribe from our list. Please tell us why you left the list, to make it possbile for us to improve our service. With best regards ", "From: mailinglist@alcatech.de\n"); if ($active == 2) mail($email,"ALCATech Mailinglist", "Lieber Abonennt, schade, dass Sie sich aus unserer BPM-Studio Mailingsliste ausgetragen haben. Bitte teilen Sie uns doch mit, warum Sie die Mailingliste nicht mehr beziehen moechten, damit wir unsere Angebote stets verbessern und erweitern koennen. Vielen Dank ", "From: mailinglist@alcatech.de\n"); } } } } } if ($debug) printf("

did this : $query
and got :%d",$res); ?>


BPM Studio Mailing List




Email Address :

"); } ?>