<?php
include ("config.php");
$file10 = fopen("bannati.php", "r");
$dimensione10 = filesize("bannati.php");
$contenuto10 = fread($file10, $dimensione10);
$ex = explode(" ", $contenuto10);
for ($x=0; $x<=count($ex); $x++) {
if ($ex[$x] == $_SERVER['REMOTE_ADDR']) {
header("location: admin/bannato.php");
} else {
}
}
?>
<?php
} else {
$autore = $_POST['autore'];
$testo = $_POST['testo'];
$email = $_POST['email'];
$oggetto = $_POST['oggetto'];
if (trim($autore) == "" OR trim($testo) == "" OR trim($email) == "" OR trim($oggetto) == "") {
header("location: mail.php?mail=$mail");
} else {
mail($mail, $oggetto, $testo, "From: $autore - $email");
?>
<div align="center"><font class="title"><?php echo "$guestbook"; ?></font>
E-mail inviata con sucesso. Grazie</div>
<?php
$chiusura = fclose($apertura);
}
}
?>