Newsletter abmelden


"); if (isset($_GET["uid"])) { $uid = $_GET["uid"]; } else { $uid = 0; } if (isset($_GET["pass"])) { $pass = $_GET["pass"]; $laenge = strlen($pass)-1; $pass=substr($pass,5,$laenge); } else { $pass = ""; } if (isset($_GET["todo"])) { $todo = $_GET["todo"]; } else { $todo = "nix"; } if ($uid==0) { echo("Dieses Newsletter-Abo existiert nicht!







"); } else { //Daten auslesen ... $sql_user = "SELECT t1.uid, t1.name, t1.mail, t1.status, t1.data, t1.pass, t2.lid as lid, t3.street as street, t3.additional as additional, t3.city as city, t3.province, t3.postal_code as zip, t3.country as country, t3.latitude as latitude, t3.longitude as longitude, t4.field_newslet_value, t5.field_first_name_value AS vorname, t6.field_last_name_value AS nachname, t7.field_newslet_value AS newslet FROM users AS t1 LEFT JOIN location_instance AS t2 ON (t1.uid = t2.uid) LEFT JOIN location AS t3 ON (t3.lid=t2.lid) LEFT JOIN field_data_field_newslet AS t4 ON (t1.uid = t4.entity_id) LEFT JOIN field_data_field_first_name AS t5 ON (t1.uid = t5.entity_id) LEFT JOIN field_data_field_last_name AS t6 ON (t1.uid = t6.entity_id) LEFT JOIN field_data_field_newslet AS t7 ON (t1.uid = t7.entity_id) WHERE t1.pass LIKE '%".$pass."%' AND t1.uid=".$uid." GROUP BY t1.uid "; //echo($sql_user."

"); $result = db_query($sql_user); foreach ($result as $row) { if ($todo=="nix") { if ($row->newslet==1) { $my_homepage = "http://www.mamilade.at"; if ($row->country=='at') $my_homepage = "http://www.mamilade.at"; if ($row->country=='de') $my_homepage = "http://www.mamilade.de"; if ($row->country=='ch') $my_homepage = "http://www.mamilade.ch"; echo("Hallo ".$row->vorname."

"); echo('Willst Du den mamilade-Newsletter wirklich stornieren????   '); echo('   '); echo('  







'); } else { echo("Hallo ".$row->vorname."

Dieses Newsletter-Abo wurde bereits storniert!









"); } } if ($todo=="cancel") { $sql_delete = "UPDATE field_data_field_newslet set field_newslet_value=0 WHERE entity_id=".$uid; $rs_cancel = db_query($sql_delete); echo("Hallo ".$row->vorname."

"); echo('Dein Newsletter-Abo wurde erfolgreich storniert ....







'); } } } ?>

Wochenempfehlung

Stadtmuseum Rapperswil
St. Gallen > See-Gaster
Das Stadtmuseum bietet Eltern und Kindern einen faszinierenden Einblick in die historische Entwicklung von Rapperswil-Jona sowie in das einstige Leben und Wirken der Bevölkerung.
  • Regen ist kein Problem