home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2002 March
/
Chip_2002-03_cd1.bin
/
internet
/
html
/
sendmail.php
< prev
next >
Wrap
PHP Script
|
2001-12-15
|
3KB
|
84 lines
<?
/*
PovinnΘ parametry:
$komu ... adresa p°φjemce
$email ... adresa odesφlatele
NepovinnΘ parametry:
$predmet ... p°edm∞t mailu
$nexturl ... strßnka s pod∞kovßnφm
$backurl ... adresa strßnky pro nßvrat
$html ... Y/N - odeslat ve formßtu HTML
$telo ... polo₧ky pro odeslßnφ v mailu zaΦφnajφ na #
*/
require("functions.php");
if ($html == "Y") include("class.html.mime.mail.inc");
if ($komu && $email) {
if ($html == "Y") {
$mail = new html_mime_mail("X-Mailer: Html Mime Mail Class");
$mail->add_html(ToISO($telo), "");
$mail->set_charset('iso-8859-2', TRUE);
$mail->build_message();
$mail->send($komu, $komu, $email, $email, $predmet);
} else {
mail($komu, ToISO($predmet), ToISO($telo), "From: $email");
}
if ($nexturl != "") {
echo "<script language=\"JavaScript1.2\"><!--\n";
echo "self.location=\"$nexturl\";\n";
echo "// -->\n";
echo "</script>";
} else {
echo "<head>\n<title>Zprßva odeslßna</title>\n</head>\n";
echo "<style type=\"text/css\">\n<!--\n";
echo "body {font-family: Verdana; font-size: 15px; font-weight: bold;}\n";
echo "table {font-family: Verdana; font-size: 15px; font-weight: bold;}\n";
echo "A:link { color: #0000A0; text-decoration: underline; }\n";
echo "A:visited { color: #0000A0; text-decoration: underline; }\n";
echo "A:active { color:blue; text-decoration: none; }\n";
echo "A:hover { color:blue; text-decoration: none; }\n";
echo "-->\n</style>\n";
echo "<body bgcolor=\"#ffffff\"><table><tr><td><label>\n";
echo "<font color=\"#0000A0\"><h1>OK!</h1></font>\n";
echo "<p>VaÜe zprßva byla v po°ßdku odeslßna.<br>\n";
echo "Pokud chcete odeslat dalÜφ, klikn∞te <a href=mailform.php>sem</a>.</p>\n";
echo "<tr><td colspan=2 align=right><br><br><hr size=1><label><font size=1>Vyrobil\n";
echo "<a href=mailto:smejkyho@mail.cz title=\"webmaster\">Ümejky</a> ⌐ 2001</font></label>\n";
echo "</table>\n</body>\n";
if ($backurl != "") {
echo("<!-- Zkuste to znova :) -->");
} else {
echo("<!-- Zkuste to znova :( -->");
}
}
} else {
echo "<html>\n<head>\n<title>Chyba</title>\n</head>";
echo "<style type=\"text/css\">\n<!--\n";
echo "body {font-family: Verdana; font-size: 15px; font-weight: bold;}\n";
echo "table {font-family: Verdana; font-size: 15px; font-weight: bold;}\n";
echo "A:link { color: #0000A0; text-decoration: underline; }\n";
echo "A:visited { color: #0000A0; text-decoration: underline; }\n";
echo "A:active { color:blue; text-decoration: none; }\n";
echo "A:hover { color:blue; text-decoration: none; }\n";
echo "-->\n</style>\n";
echo "<body bgcolor=\"#ffffff\"><table><tr><td><label>\n";
echo "<font color=\"#0000A0\"><h1>Chyba!</h1></font>\n";
echo "<p>VaÜe zprßva nemohla b²t odeslßna. Z°ejm∞ jste nezadali vÜechny pot°ebnΘ ·daje.<br>\n";
echo "Vra¥te se prosφm <a href=mailform.php>zp∞t</a> a opravte zkuste to znovu.</p>\n";
echo "<tr><td colspan=2 align=right><br><br><hr size=1><label><font size=1>Vyrobil\n";
echo "<a href=mailto:smejkyho@mail.cz title=\"webmaster\">Ümejky</a> ⌐ 2001</font></label>\n";
echo "</table>\n</body>\n</html>\n";
}
?>