knuppel
Legacy Member
VBVK.be
Hallo,
als je je aanmeld bij de nieuwsbrief krijg je een foutmelding,
als je je probeert aftemelden bij de nieuwsbrief als je er niet instaat krijg je een foutmelding.
Hoe krijg ik die fouten eruit ?
Dit is de code van het deel VBVK.be Opleidingen
Mvg Geert
Hallo,
als je je aanmeld bij de nieuwsbrief krijg je een foutmelding,
als je je probeert aftemelden bij de nieuwsbrief als je er niet instaat krijg je een foutmelding.
Hoe krijg ik die fouten eruit ?
Dit is de code van het deel VBVK.be Opleidingen
PHP:
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Language" content="nl-be" />
<title>VBVK.be</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252" />
<meta name="description" content="VBVK - Vlaamse Beroepsvereniging voor Verpleegkundig Kaderpersoneel" />
<meta name="keywords" content="VBVK, vbvk, Vlaamse, Beroepsvereniging, voor, Verpleegkundig, Kaderpersoneel,Vlaamse Beroepsvereniging voor Verpleegkundig Kaderpersoneel,
verpleegsunie, verpleegkunde, BaNaBa, banaba, lid, lid worden, lid worden van vbvk, verpleging, erasmus, vorming, hoofdverpleegkundige, psyschiatrische, instellingen,
thuiszorg, opleidingen, congressen, congressen voor het kaderpersoneel, bachelor, zorgmanagement, bachelor in zorgmanagement, jos soors, ludo meyers, Jean Paul van Baelen,
Verpleegkundig kagder, tijdschrift, Tijdschrift Verpleegkundig kader, website, design, web " />
<link rel="stylesheet" type="text/css" href="../vbvk.css" />
</head>
<body>
<div align="center">
<table border="0" width="740" cellspacing="0" cellpadding="0">
<tr>
<td width="474" style="border-bottom: 1px solid #8A826A">
<table border="0" width="437" cellspacing="0" cellpadding="0">
<tr>
<td>
<img border="0" src="../../images/Vbvk_LinksBoven.gif" alt="LinksBoven" width="437" height="54" /></td>
</tr>
<tr>
<td>
<table border="0" width="437" cellspacing="0" cellpadding="0">
<tr>
<td>
<img border="0" src="../../images/Vbvk_LinksVoor.gif" alt="LinksVoor" width="6" height="9" /></td>
<td> <a href="vbvk.php">
<img border="0" src="../../images/Vbvk_Vbvk.gif" alt="LinksVbvk" width="21" height="9" /></a></td>
<td>
<img border="0" src="../../images/Vbvk_LinksTussen.gif" alt="LinksTussen" width="14" height="9" /></td>
<td> <a href="agenda.php">
<img border="0" src="../../images/Vbvk_Agenda.gif" alt="LinksAgenda" width="33" height="9" /></a></td>
<td>
<img border="0" src="../../images/Vbvk_LinksTussen.gif" alt="LinksTussen" width="14" height="9" /></td>
<td> <a href="opleiding.php">
<img border="0" src="../../images/Vbvk_Opleiding.gif" alt="LinksOpleiding" width="53" height="9" /></a></td>
<td>
<img border="0" src="../../images/Vbvk_LinksTussen.gif" alt="LinksTussen" width="14" height="9" /></td>
<td> <a href="tijdschrift.php">
<img border="0" src="../../images/Vbvk_Tijdschrift.gif" alt="LinksTijdschrift" width="47" height="9" /></a></td>
<td>
<img border="0" src="../../images/Vbvk_LinksTussen.gif" alt="LinksTussen" width="14" height="9" /></td>
<td> <a href="lid.php">
<img border="0" src="../../images/Vbvk_Lid.gif" alt="LinksLid" width="49" height="9" /></a></td>
<td>
<img border="0" src="../../images/Vbvk_LinksTussen.gif" alt="LinksTussen" width="14" height="9" /></td>
<td> <a href="contactpersonen.php">
<img border="0" src="../../images/Vbvk_Contactpersonen.gif" alt="LinksContactpersoon" width="75" height="9" /></a></td>
<td>
<img border="0" src="../../images/Vbvk_LinksTussen.gif" alt="LinksTussen" width="83" height="9" /></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<img border="0" src="../../images/Vbvk_LinksOnder.gif" alt="LinksOnder" width="437" height="11" /></td>
</tr>
</table>
</td>
<td width="11" style="border-bottom: 1px solid #8A826A">
<img border="0" src="../../images/Vbvk_Voor.gif" alt="VbvkVoor" width="11" height="74" /></td>
<td style="border-bottom: 1px solid #8A826A">
<table border="0" width="49" cellspacing="0" cellpadding="0">
<tr>
<td>
<img border="0" src="../../images/Vbvk_Boven.gif" alt="VbvkBoven" width="49" height="30" /></td>
</tr>
<tr>
<td>
<table border="0" width="49" cellspacing="0" cellpadding="0">
<tr>
<td> <a href="index.php">
<img border="0" src="../../images/Vbvk_Home.gif" alt="VbvkHome" width="9" height="11" /></a></td>
<td>
<img border="0" src="../../images/Vbvk_Tussen.gif" alt="VbvkTussen" width="10" height="11" /></td>
<td> <a href="contact.php">
<img border="0" src="../../images/Vbvk_Contact.gif" alt="VbvkContact" width="12" height="11" /></a></td>
<td>
<img border="0" src="../../images/Vbvk_Tussen.gif" alt="VbvkTussen"width="10" height="11" /></td>
<td> <a href="admin.php">
<img border="0" src="../../images/Vbvk_Admin.gif" alt="VbvkAdmin" width="8" height="11" /></a></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<img border="0" src="../../images/Vbvk_Onder.gif" alt="VbvkOnder" width="49" height="33" /></td>
</tr>
</table>
</td>
<td width="243" style="border-bottom: 1px solid #8A826A" >
<img border="0" src="../../images/Vbvk_Logo.gif" alt="VbvkLogo" width="243" height="74" /></td>
</tr>
</table>
<br />
<table border="0" width="740" cellspacing="0" cellpadding="0">
<tr>
<td class="tabel2" width="210">
<table border="0" width="210" cellspacing="0" cellpadding="0">
<tr>
<td class="tabel"width="210">
<table border="0" width="210" cellspacing="2" cellpadding="1">
<tr>
<td>
<a href="zorgmanagement.php">Bachelor in zorgmanagement BaNaBa</a>
<br />
<a href="refvk.php">Ref.verpleegkundigen zieknhuishygiëne</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td width="30" align="left"> </td>
<td class="tabel" width="500" align="left">
<table border="0" width="500" cellspacing="2" cellpadding="1">
<tr>
<td>
<font size="4" color="#11970A">Opleidingen</font>
<br />
<br />
</td>
</tr>
</table>
</td>
</tr>
</table>
<br />
<br />
<br />
<table border="0" width="740" cellspacing="0" cellpadding="0" >
<tr>
<td class="tabel2" width="210" style="border-bottom: 1px solid #8A826A">
<p class="titel"> Vereniging </p>
<select name="select" class="dropdown_menu" onchange="window.open(this.options[this.selectedIndex].value)">
<option>Kies uw site</option>
<option value="http://www.callus.be/">BVGB-Callus</option>
<option value="http://www.nnbvv.be/">NNBVV</option>
<option value="http://www.nvkvv.be/">NVKVV</option>
<option value="http://www.orpadt.be/">ORPADT</option>
<option value="http://www.urobel.be/">UROBEL</option>
<option value="http://www.stomavlas.be/">VLAS</option>
<option value="http://www.vvizv.be/">VVIZV</option>
<option value="http://www.vvov.info/">VVOV</option>
<option value="http://www.vvro.be/">VVRO</option>
<option value="http://www.vvvs.be/">VVVS</option>
</select></td>
<td width="30" align="left" style="border-bottom: 1px solid #8A826A"> </td>
<td width="500" align="left" style="border-bottom: 1px solid #8A826A">
<p class="titel"> Nieuwsbrief </p>
<form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<input name="Mailadres" type="text" class="nieuwsbrief" value="Typ uw e-mail adres" />
<input type="submit" name="submit" class="knop" value="Verzenden" />
<br />
<input type='radio' name='actie' value='aanmelden' checked="checked" />
Aanmelden
<input type='radio' name='actie' value='afmelden' /> Afmelden
</form>
<?php
//----------------------------------------
// Verander de gegevens hieronder:
error_reporting(E_ALL);
$JouwWebsiteNaam = "VBVK.be";
// Jouw website naam
$JouwEmail = "[email protected]";
// Jouw e-mail adres
$DataBestand = "nieuwsbrief.dat";
// De locatie van het databestand
$DitBestand = "http://www.vbvk.be/";
// De url van dit bestand
if($_SERVER['REQUEST_METHOD'] == "POST"){
$submit_subject = "Aanmelding Nieuwsbrief " . $JouwWebsiteNaam ; //onderwerp van het bericht als iemand aanmeldt
$delete_subject = "Afmelding Nieuwsbrief " . $JouwWebsiteNaam ; //onderwerp van het bericht als iemand afmeldt
$submit_bericht = "Beste eigenaar van " . $_POST['Mailadres'] . " ,\n\n U of iemand anders heeft dit e-mail adres\naangemeld bij de Nieuwsbrief van " . $JouwWebsiteNaam . " .\nWilt u dit ongedaan maken, dan kan dit op\n" . $DitBestand . ".\n\n " . $JouwWebsiteNaam ; //bericht wat verstuurd wordt als iemand aangemeld wordt
$delete_bericht = "Beste eigenaar van " . $_POST['Mailadres'] ." ,\n\nU of iemand anders heeft dit e-mail adres\nafgemeld bij de Nieuwsbrief van ". $JouwWebsiteNaam . " .\nWilt u dit ongedaan maken, dan kan dit op\n ". $DitBestand. ".\n\n ". $JouwWebsiteNaam ;
$headers = "From: VBVK.be <".$JouwEmail.">\r\n";
// Begin functie om het e-mail adres te controleren
function ControleerEmail($a) {
return ereg("[A-Za-z0-9_-]+([\.]{1}[A-Za-z0-9_-]+)*@[A-Za-z0-9-]+([\.]{1}[A-Za-z0-9-]+)+",$a);
}
// Einde functie om het e-mail adres te controleren
$NieuwsbriefData = file($DataBestand);
if($_POST['actie'] == "aanmelden") {
if(isset($_POST['Mailadres'])) {
for($i = 0; $i < count($NieuwsbriefData); $i++) {
if(strstr($NieuwsbriefData[$i],$_POST['Mailadres'])){ $alinlijst = true; }
else{ $alinlijst = "false"; }
}
if(!ControleerEmail($_POST['Mailadres'])) { echo("<b>Het e-mail adres is ongeldig!</b><br><br>"); }
elseif($alinlijst == "true") { echo("<b>Het e-mail adres staat al in de lijst!</b><br><br>"); }
else {
$NieuwsbriefB = fopen($DataBestand,"a");
fputs($NieuwsbriefB,$_POST['Mailadres'] . "\r\n");
fclose($NieuwsbriefB);
mail($_POST['Mailadres'], $submit_subject, $submit_bericht , $headers);
echo("<b>Het e-mail adres is succesvol aangemeld!</b><br><br>
<br><br>
");
}
}
else { echo("<b>Je hebt geen e-mail adres ingevuld!</b><br><br>"); }
}
elseif($_POST['actie'] == "afmelden") {
if(isset($_POST['Mailadres'])) {
$NieuwsbriefB = fopen($DataBestand,"w");
for($i = 0; $i < count($NieuwsbriefData); $i++) {
if(!strstr($NieuwsbriefData[$i],$_POST['Mailadres'])) { fputs($NieuwsbriefB,$NieuwsbriefData[$i]); $gelukt = "false"; }
else { $gelukt = true; }
}
fclose($NieuwsbriefB);
if($gelukt == "true") {
mail($_POST['Mailadres'], $delete_subject, $delete_bericht , $headers);
echo("<b>Het e-mail adres is succesvol afgemeld!</b><br><br>");
}
else {
echo("<b>Het e-mail adres is niet gevonden!<br>Probeer het opnieuw.</b><br><br>");
}
}
else { echo("<b>Je hebt geen e-mail adres ingevuld!</b><br><br>"); }
}
}
?>
</td>
</tr>
</table>
<br />
<font size="1">made by<a target="_blank" href="http://www.2g-desi9n.be"> 2G-desi9n
</a>| © Vbvk.be </font>
</div>
</body>
</html>
Mvg Geert
)