Sono di fretta e quindi vi lascio il codice intero:
Codice PHP:
// leggiamo le email
$filename_hackmix = "emails_hackmix.txt";
$filename_fungaming = "email_fungaming.txt";
// destinatario hackmix
$handle_hackmix = fopen($filename_hackmix, "r");
$destinatario_hackmix = fread($handle_hackmix, filesize($filename_hackmix));
fclose($handle);
// destinatario fungaming
$handle_fungaming = fopen($filename_fungaming, "r");
$destinatario_fungaming = fread($handle_fungaming, filesize($filename_fungaming));
fclose($handle);
// altri dati
$link_hackmix = $_POST['link_hackmix'];
$link_fungaming = $_POST['link_fungaming'];
$nome = $_POST['nome'];
$date = date("d/m/y - H:i");
$header = "From: ZioPaperino <zio.hackmix@gmail.com>\n";
$header .= "MIME-Version: 1.0\n";
$header .= "Content-Type: text/html; charset=\"iso-8859-1\"\n";
$header .= "Content-Transfer-Encoding: 7bit\n\n";
// -------------------------------------------------------- MESSAGGI -------------------------------------------------------- //
// Messaggio HackMix
$messaggio_hackmix = ("<html>
<body bgcolor=\"#555555\">
<font face=\"Tahoma\">
<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">
<tr id=\"titolo\">
<td colspan=\"3\">
<center>
<font size=\"6px\" color=\"CORNFLOWERBLUE\"><a style=\"color: CORNFLOWERBLUE;\" href=\"".$link_hackmix."\">".$nome."</a></font>
<font size=\"2\">(clicca sul nome per scaricare)</font>
</center>
</td>
</tr>
</table>
<table align=\"center\">
<tr>
<td><table align=\"center\">
<tr><td><img src=\"http://www.ilbazardimari.net/pecora.gif\"></td><td><img src=\"http://img69.imageshack.us/img69/535/zioq.png\"></td></tr>
</table></td>
</tr>
<tr>
<td><img src=\"http://img96.imageshack.us/img96/459/problemsd.png\"></td>
</tr>
</table>
</font>
</body>
</html>
<font size=\"1\" color=\"#555555\"><center>");
// Messaggio FunGaming
$messaggio_fungaming = ("<html>
<body bgcolor=\"#555555\">
<font face=\"Tahoma\">
<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">
<tr id=\"titolo\">
<td colspan=\"3\">
<center>
<font size=\"6px\" color=\"CORNFLOWERBLUE\"><a style=\"color: CORNFLOWERBLUE;\" href=\"".$link_hackmix."\">".$nome."</a></font>
<font size=\"2\">(clicca sul nome per scaricare)</font>
</center>
</td>
</tr>
</table>
<table align=\"center\">
<tr>
<td><table align=\"center\">
<tr><td><img src=\"http://www.ilbazardimari.net/pecora.gif\"></td><td><img src=\"http://img69.imageshack.us/img69/535/zioq.png\"></td></tr>
</table></td>
</tr>
<tr>
<td><img src=\"http://img96.imageshack.us/img96/459/problemsd.png\"></td>
</tr>
</table>
</font>
</body>
</html>
<font size=\"1\" color=\"#555555\"><center>");
// -------------------------------------------------------- INVIO EMAIL -------------------------------------------------------- //
echo "<table align=\"center\"><tr>";
// Invio eMail HackMix
if(empty($_POST['nome']) || empty($_POST['link_hackmix'])) {
echo "Non hai compilato tutti i campi!";
}else {
$oggetto = ("[" . "$date" . "] " . $_POST['nome']);
if(mail($destinatario_hackmix, $oggetto, $messaggio_hackmix, $header))
echo "<td><font color='green' size='5'>[b]Mail inviata correttamente[/b]</font></td>";
else
echo "<td><font color='red' size='10'>[b]Errore nell'invio della mail! Controlla i dati![/b]</font></td>";
}
echo "<td><font size='10'> | </font></td>";
// Invio eMail FunGaming
if(empty($_POST['nome']) || empty($_POST['link_fungaming'])) {
echo "Non hai compilato tutti i campi!";
}else {
$oggetto = ("[" . "$date" . "] " . $_POST['nome']);
if(mail($destinatario_fungaming, $oggetto, $messaggio_fungaming, $header))
echo "<td><font color='green' size='5'>[b]Mail inviata correttamente[/b]</font></td>";
else
echo "<td><font color='red' size='10'>[b]Errore nell'invio della mail! Controlla i dati![/b]</font></td>";
}
echo "</tr></table>";
echo "<hr align='center' width='60%'>";
// -------------------------------------------------------- HACK LIST -------------------------------------------------------- //
// Hack List
echo "<form action=\"../hack/dati.php\" method=\"post\">
<table align=\"center\">
<tr><td>Nome: </td><td><input type=\"text\" name=\"nome\" value=\"$nome\"></td></tr>
<tr><td>Status: </td><td><select name=\"status\"><option value=\"Undetected\">Undetected</option><option value=\"Detected\">Detected</option></select></td></tr>
<tr><td>Autore: </td><td><input type=\"text\" name=\"autore\" value=\"ZioPaperino\"></td></tr>
<tr><td>Autore link: </td><td><input type=\"text\" name=\"autore_link\" value=\"http://www.ziopaperino.altervista.org/\"></td></tr>
<tr><td colspan=\"2\">
</td></tr>
<tr><td>Link Hackmix: </td><td><input type=\"text\" name=\"link_hackmix\" value=\"$link_hackmix\"></td></tr>
<tr><td>Link FunGaming: </td><td><input type=\"text\" name=\"link_fungaming\" value=\"$link_fungaming\"></td></tr>
<tr><td colspan=\"2\">
</td></tr>
<tr><td colspan=\"2\"><input type=\"submit\" value=\"Invia!\" style=\"width: 100%;\"></td></tr>
</table>
</form>";
in pratica mi dovrebbe inviare 2 email ma ne invia solo 1, perchè?
in pratica mi dovrebbe