'; echo $r['stylesheet']; echo ''; } } ?>

$subject

Hej $_POST[formname]

$emailmessage
Vedhæftede filer:
$file_list

Sendt den: $dato

"; $altbody = "$subject Hej $_POST[formname] $emailmessage Vedhæftede filer: $file_list Sendt den: $dato"; require("class.phpmailer.php"); $mail = new PHPMailer(); $mail->From = $email; $mail->FromName = "Brink Offices"; $mail->AddAddress($formemail,$_POST[formname]); if($attachmentssetting == 'listcheck') { if($_POST['attachment1'] != '') { $mail->AddAttachment('pdf-files/' . $_POST['attachment1']); } if($_POST['attachment2'] != '') { $mail->AddAttachment('pdf-files/' . $_POST['attachment2']); } if($_POST['attachment3'] != '') { $mail->AddAttachment('pdf-files/' . $_POST['attachment3']); } if($_POST['attachment4'] != '') { $mail->AddAttachment('pdf-files/' . $_POST['attachment4']); } if($_POST['attachment5'] != '') { $mail->AddAttachment('pdf-files/' . $_POST['attachment5']); } if($_POST['attachment6'] != '') { $mail->AddAttachment('pdf-files/' . $_POST['attachment6']); } if($_POST['attachment7'] != '') { $mail->AddAttachment('pdf-files/' . $_POST['attachment7']); } if($_POST['attachment8'] != '') { $mail->AddAttachment('pdf-files/' . $_POST['attachment8']); } if($_POST['attachment9'] != '') { $mail->AddAttachment('pdf-files/' . $_POST['attachment9']); } if($_POST['attachment10'] != '') { $mail->AddAttachment('pdf-files/' . $_POST['attachment10']); } } else { $n = 1; while($n <= 10) { $value = "attachment" . $n; if($$value != '') { array_push($files, $$value); $mail->AddAttachment('pdf-files/' . $$value); } $n++; } } $mail->IsHTML(true); $mail->Subject = $subject; $mail->Body = $body; $mail->AltBody = $altbody; if(!$mail->Send()) { echo $errorsentmessage; exit; } $inputs = ""; if($_POST['input1label'] != "") { $inputs .= $input1label . ": " . $_POST['input1label'] . "
"; } if($_POST['input2label'] != "") { $inputs .= $input2label . ": " . $_POST['input2label'] . "
"; } if($_POST['input3label'] != "") { $inputs .= $input3label . ": " . $_POST['input3label'] . "
"; } if($_POST['input4label'] != "") { $inputs .= $input4label . ": " . $_POST['input4label'] . "
"; } if($_POST['input5label'] != "") { $inputs .= $input5label . ": " . $_POST['input5label'] . "
"; } if($_POST['input6label'] != "") { $inputs .= $input6label . ": " . $_POST['input6label'] . "
"; } if($_POST['input7label'] != "") { $inputs .= $input7label . ": " . $_POST['input7label'] . "
"; } if($_POST['input8label'] != "") { $inputs .= $input8label . ": " . $_POST['input8label'] . "
"; } if($_POST['input9label'] != "") { $inputs .= $input9label . ": " . $_POST['input9label'] . "
"; } if($_POST['input10label'] != "") { $inputs .= $input10abel . ": " . $_POST['input10label'] . "
"; } $body2 = "

$subject

Hej

Følgende person har bestilt materiale via kontaktformularen:
$_POST[formname] ($formemail)

$inputs
Vedhæftede filer:
$file_list

Sendt den: $dato

"; $altbody2 = "$subject Hej Følgende person har bestilt materiale via kontaktformularen: $_POST[formname] ($formemail) $inputs Vedhæftede filer: $file_list Sendt den: $dato"; $mail2 = new PHPMailer(); $mail2->From = $email; $mail2->FromName = "Brink Offices"; $mail2->AddAddress($email,"Brink Offices"); $mail2->IsHTML(true); $mail2->Subject = $subject; $mail2->Body = $body2; $mail2->AltBody = $altbody2; if(!$mail2->Send()) { echo $errorsentmessage; exit; } echo $sentmessage; } } else { $query = mysql_query("SELECT * FROM contactforms WHERE id='$_REQUEST[id]' ") or die(mysql_error()); if(mysql_num_rows($query) != 0) { $r = mysql_fetch_array($query); $title = $r["title"]; $subject = $r["subject"]; $email = $r["email"]; $emailmessage = $r["emailmessage"]; $sentmessage = $r["sentmessage"]; $errorsentmessage = $r["errorsentmessage"]; $inputname = $r["inputname"]; $inputemail = $r["inputemail"]; $input1label = $r["input1label"]; $input1type = $r["input1type"]; $input2label = $r["input2label"]; $input2type = $r["input2type"]; $input3label = $r["input3label"]; $input3type = $r["input3type"]; $input4label = $r["input4label"]; $input4type = $r["input4type"]; $input5label = $r["input5label"]; $input5type = $r["input5type"]; $input6label = $r["input6label"]; $input6type = $r["input6type"]; $input7label = $r["input7label"]; $input7type = $r["input7type"]; $input8label = $r["input8label"]; $input8type = $r["input8type"]; $input9label = $r["input9label"]; $input9type = $r["input9type"]; $input10label = $r["input10label"]; $input10type = $r["input10type"]; $attachmentslabel = $r["attachmentslabel"]; $attachmentssetting = $r["attachmentssetting"]; $attachment1label = $r["attachment1label"]; $attachment1 = $r["attachment1"]; $attachment2label = $r["attachment2label"]; $attachment2 = $r["attachment2"]; $attachment3label = $r["attachment3label"]; $attachment3 = $r["attachment3"]; $attachment4label = $r["attachment4label"]; $attachment4 = $r["attachment4"]; $attachment5label = $r["attachment5label"]; $attachment5 = $r["attachment5"]; $attachment6label = $r["attachment6label"]; $attachment6 = $r["attachment6"]; $attachment7label = $r["attachment7label"]; $attachment7 = $r["attachment7"]; $attachment8label = $r["attachment8label"]; $attachment8 = $r["attachment8"]; $attachment9label = $r["attachment9label"]; $attachment9 = $r["attachment9"]; $attachment10label = $r["attachment10label"]; $attachment10 = $r["attachment10"]; $button = $r["button"]; ?>

 

" />




'; } $i = 1; while($i <= 10) { $label = "attachment" . $i . "label"; $value = "attachment" . $i; if($$label != '' && $$value != '') { if($attachmentssetting == 'list') { echo '
  • ' . $$label . '
  • '; } else { echo '

    ' . $$label . '

    '; } } $i++; } if($attachmentssetting == 'list') { echo ''; } ?>
    Kontaktformularen er ikke sat rigtigt op - kontakt venligst clausen@dd-i.dk