$_POST['sendepost_epost'] = htmlspecialchars(strip_tags($_POST['sendepost_epost']), ENT_QUOTES); $_POST['sendepost_melding'] = htmlspecialchars(strip_tags($_POST['sendepost_melding']), ENT_QUOTES); if ($_POST['sendepost_navn'] == '' || $_POST['sendepost_epost'] == '' || $_POST['sendepost_melding'] == '') { $epostform_feilfunnet = true; } else { // Sender epost med spørsmål $mail = new mail(); $mail->AddReplyTo($_POST['sendepost_epost'], $_POST['sendepost_navn']); $mail->AddAddress('*****@*****.**'); $mail->Subject = "JM-booking - Loginmelding"; $smarty = new Smarty(); $smarty->assign('navn', $_POST['sendepost_navn']); $smarty->assign('epost', $_POST['sendepost_epost']); $smarty->assign('melding', $_POST['sendepost_melding']); $mail->Body = $smarty->fetch('epost/loginmelding.tpl'); if (!$mail->Send()) { echo 'Det oppsto en feil ved sendingen av e-posten.<br>' . chr(10); echo '<b>Error:</b> ' . $mail->ErrorInfo; exit; } header('Location: ' . $_SERVER['PHP_SELF'] . '?melding_sendt=1'); exit; } } if (isLoggedIn()) { echo _("You're already logged in.") . '<br><br>'; echo "<a href=\"logout.php\">" . _("Log out") . '</a>'; exit; } else { authGet(''); exit;