ini_set('display_errors', 0);
include('classes/fpdf/fpdf.php');
include('classes/fpdi/fpdi.php');
include('classes/phpmailer/class.phpmailer.php');
if ($_POST[action]=="handleform")
{
if ($_POST[q3]=="")
{
$error3 = 1;
}
if ($_POST[q4]=="")
{
$error4 = 1;
}
if ($_POST[q5])
{
if (!preg_match("/^[a-z0-9]+([_\\.-][a-z0-9]+)*@([a-z0-9]+([\.-][a-z0-9]+)*)+\\.[a-z]{2,}$/i", $_POST[q5]))
{
$error5 = 1;
}
}
if (!$error3 && !$error4 && !$error5)
{
$q1 = stripslashes($_POST[q1]);
$q1 = iconv('UTF-8', 'windows-1252', $q1);
$q2 = stripslashes($_POST[q2]);
$q2 = iconv('UTF-8', 'windows-1252', $q2);
$q3 = stripslashes($_POST[q3]);
$q3 = iconv('UTF-8', 'windows-1252', $q3);
$q4 = stripslashes($_POST[q4]);
$q4 = iconv('UTF-8', 'windows-1252', $q4);
$q5 = stripslashes($_POST[q5]);
$q5 = iconv('UTF-8', 'windows-1252', $q5);
$q6 = stripslashes($_POST[q6]);
$q6 = iconv('UTF-8', 'windows-1252', $q6);
$q7 = stripslashes($_POST[q7]);
$q7 = iconv('UTF-8', 'windows-1252', $q7);
$q8 = stripslashes($_POST[q8]);
$q8 = iconv('UTF-8', 'windows-1252', $q8);
$q9 = stripslashes($_POST[q9]);
$q9 = iconv('UTF-8', 'windows-1252', $q9);
$q10 = stripslashes($_POST[q10]);
$q10 = iconv('UTF-8', 'windows-1252', $q10);
$q11 = stripslashes($_POST[q11]);
$q11 = iconv('UTF-8', 'windows-1252', $q11);
$q12 = stripslashes($_POST[q12]);
$q12 = iconv('UTF-8', 'windows-1252', $q12);
$q13 = stripslashes($_POST[q13]);
$q13 = iconv('UTF-8', 'windows-1252', $q13);
$q14 = stripslashes($_POST[q14]);
$q14 = iconv('UTF-8', 'windows-1252', $q14);
$q15 = stripslashes($_POST[q15]);
$q15 = iconv('UTF-8', 'windows-1252', $q15);
$q16 = stripslashes($_POST[q16]);
$q16 = iconv('UTF-8', 'windows-1252', $q16);
$q17 = stripslashes($_POST[q17]);
$q17 = iconv('UTF-8', 'windows-1252', $q17);
$q18 = stripslashes($_POST[q18]);
$q18 = iconv('UTF-8', 'windows-1252', $q18);
$q19 = stripslashes($_POST[q19]);
$q19 = iconv('UTF-8', 'windows-1252', $q19);
$q20 = stripslashes($_POST[q20]);
$q20 = iconv('UTF-8', 'windows-1252', $q20);
$q21 = stripslashes($_POST[q21]);
$q21 = iconv('UTF-8', 'windows-1252', $q21);
$q22 = stripslashes($_POST[q22]);
$q22 = iconv('UTF-8', 'windows-1252', $q22);
$q23 = stripslashes($_POST[q23]);
$q23 = iconv('UTF-8', 'windows-1252', $q23);
$q24 = stripslashes($_POST[q24]);
$q24 = iconv('UTF-8', 'windows-1252', $q24);
$q25 = stripslashes($_POST[q25]);
$q25 = iconv('UTF-8', 'windows-1252', $q25);
$pdf = new FPDI();
$source = "docs/opzeggen.pdf";
$pdf->setSourceFile($source);
$pdf->AddFont('Calibri','','calibri.php');
$pdf->SetFont('Calibri','','11');
$pdf->AddPage();
$tplIdx = $pdf->importPage(1);
$pdf->useTemplate($tplIdx, 0, 0);
$x = 49;
$y = 41.5;
$pdf->SetXY($x, $y);
$pdf->Write(0, $q1);
if ($q2!="dd/mm/jj")
{
$x = 153;
$y = 41.5;
$pdf->SetXY($x, $y);
$pdf->Write(0, $q2);
}
$x = 49;
$y = 49.7;
$pdf->SetXY($x, $y);
$pdf->Write(0, $q3);
$x = 153;
$y = 49.4;
$pdf->SetXY($x, $y);
$pdf->Write(0, $q4);
$x = 49;
$y = 57.9;
$pdf->SetXY($x, $y);
$pdf->Write(0, $q5);
$x = 72;
$y = 79.2;
$pdf->SetXY($x, $y);
$pdf->Write(0, $q6);
$x = 149;
$y = 79.5;
$pdf->SetXY($x, $y);
$pdf->Write(0, $q7);
if ($_POST[q8]=="man")
{
$x = 72;
$y = 87.1;
}
else
{
$x = 91;
$y = 87.1;
}
$pdf->SetXY($x, $y);
$pdf->Write(0, 'X');
if ($q9!="dd/mm/jj")
{
$x = 149;
$y = 87.1;
$pdf->SetXY($x, $y);
$pdf->Write(0, $q9);
}
$x = 72;
$y = 98.7;
$pdf->SetXY($x, $y);
$pdf->Write(0, $q10);
$x = 149;
$y = 98.6;
$pdf->SetXY($x, $y);
$pdf->Write(0, $q11);
$x = 72;
$y = 105.9;
$pdf->SetXY($x, $y);
$pdf->Write(0, $q12);
$x = 149;
$y = 105.9;
$pdf->SetXY($x, $y);
$pdf->Write(0, $q13);
$x = 72;
$y = 118.1;
$pdf->SetXY($x, $y);
$pdf->Write(0, $q14);
$x = 165.7;
$y = 117.8;
$pdf->SetXY($x, $y);
$pdf->Write(0, $q15);
$x = 72;
$y = 125.3;
$pdf->SetXY($x, $y);
$pdf->Write(0, $q16);
$x = 72;
$y = 132.6;
$pdf->SetXY($x, $y);
$pdf->Write(0, $q17);
$x = 13.5;
$y = 153;
$pdf->SetXY($x, $y);
$pdf->MultiCell('179', '5', $q18, '0', 'L');
if ($_POST[q19]=="1") {
$x = 79.5;
$y = 230;
$pdf->SetXY($x, $y);
$pdf->Write(0, 'X');
}
if ($_POST[q20]=="1") {
$x = 79.5;
$y = 235.5;
$pdf->SetXY($x, $y);
$pdf->Write(0, 'X');
}
if ($_POST[q21]=="1") {
$x = 79.5;
$y = 241.5;
$pdf->SetXY($x, $y);
$pdf->Write(0, 'X');
}
if ($_POST[q22]=="1") {
$x = 79.5;
$y = 247;
$pdf->SetXY($x, $y);
$pdf->Write(0, 'X');
}
if ($_POST[q23]!="") {
$x = 116;
$y = 233;
$pdf->SetXY($x, $y);
$pdf->Write(0, $q23);
}
if ($_POST[q24]!="") {
$x = 116;
$y = 246;
$pdf->SetXY($x, $y);
$pdf->Write(0, $q24);
}
if ($_POST[q25]!="") {
$x = 156;
$y = 246.5;
$pdf->SetXY($x, $y);
$pdf->Write(0, $q25);
}
if ($_POST[type]=="download")
{
$pdf->Output('opzeggen.pdf', 'D');
}
elseif ($_POST[type]=="send")
{
$pdf->Output('var/opzeggen.pdf', 'F');
$text = "";
$text .= "Beste ".$_POST[q3].", ";
$text .= "Bedankt voor het invullen van het opzeggingsformulier op onze website. ";
$text .= "Met vriendelijke groet, Loket Personenalarmering ";
$text .= " ";
$mail = new PHPMailer(true);
$body = $text;
$body = preg_replace('/\\\\/','', $body);
//$mail->IsSMTP();
$mail->Host = "localhost";
$mail->AddReplyTo("info@loketpa.nl","Loket Personenalarmering");
$mail->From = "info@loketpa.nl";
$mail->FromName = "Loket Personenalarmering";
if ($_POST[q5])
{
$mail->addAddress($_POST[q5]);
$to = "afmelding@loketpa.nl";
$mail->AddBCC($to);
}
else
{
$to = "afmelding@loketpa.nl";
$mail->addAddress($to);
}
// $to = "bcc@connexx.nl";
// $mail->AddBCC($to);
$mail->AddAttachment('var/opzeggen.pdf', 'opzeggen.pdf');
$mail->Subject = "Opzeggingsformulier $_POST[q6]";
$mail->AltBody = "To view the message, please use an HTML compatible email viewer!";
$mail->WordWrap = 80;
$mail->MsgHTML($body);
$mail->IsHTML(true);
$mail->Send();
$succes = 1;
}
}
}
?>
Loket Personenalarmering - Opzeggen
if ($succes=="1") {
?>
}
?>
if ($succes=="1")
{
?>
Het formulier is succesvol verstuurd! Wij zullen zo spoedig mogelijk uw opzegging verwerken en beantwoorden.
}
else
{
?>
Reden van opzegging
}
?>
Inleveren apparatuur
Het alarmapparaat kunt u inleveren bij de zorgpartner van LoketPersonenAlarmering.nl of opsturen naar het service centre van LoketPersonenAlarmering.nl.Bel 0413 - 273155 voor de dichtstbijzijnde zorgpartner. Adres Service Centre LoketPersonenAlarmering.nl: Postbus 425, 5400 AK Uden
Per datum dat het complete alarmapparaat (4 onderdelen) retour is ontvangen bij een zorgpartner of bij het service centre van LoketPersonenAlarmering.nl wordt het abonnement stopgezet. De ingevulde datum van opzegging geldt enkel als kennisgeving.