Ok teraz to mam takto neviem ci to je presna tak ako ste to mysleli ale kuknite a stale to nejte:)
<?php
###############################################################
# phpRS MailForm 0.7
# určeno pro phpRS verze 2.6.5
# [
http://www.supersvet.cz/phprs]
# (c) 2001-2005 by Jiri Lukas (jirilukas(at)supersvet(dot)cz)
###############################################################
# (c)2005 JaV (administrator(at)hades(dot)cz)
# [
http://www.hades.cz]
# This program is free software.
# Program testovan na phpRS 2.6.5
###############################################################
# všechny soubory jsou v kódování windows-1250
###############################################################
Header("Pragma: No-cache");
Header("Cache-Control: No-cache, Must-revalidate");
Header("Expires: ".GMDate("D, d M Y H:i:s")." GMT");
define('IN_CODE',true);
include_once("config.php");
include_once("specfce.php");
include_once("myweb.php");
include_once("sl.php");
include_once("trlayout.php");
include_once($adrlayoutu);
include_once("engine.php");
$vzhledwebu->Generuj();
ObrTabulka();
echo "<p class=\"nadpis\">Napíšte nám</p>\n";
$from = "[email]branopulis@gamil.com[/email]";
$replay = "[email]branopulis@gmail.com[/email]";
$headers .="From: $from\n";
$headers .="Replay-To: $replay\n";
if (!isset($_POST['Odeslano'])) { $_POST['Odeslano'] = false;}
if (!isset($_POST['jmeno'])) { $_POST['jmeno'] = "";}
if (!isset($_POST['email'])) { $_POST['email'] = "@";}
if (!isset($_POST['text'])) { $_POST['text'] = "";}
$zobrazitFormular = true;
if (true == $_POST['Odeslano']):
if ($_POST['jmeno'] == ""):
print "<center>nie je vyplnené meno</center>";
elseif (!eregi("^[a-zA-Z0-9._%-]+@[a-zA-Z0-9._%-]+\.[a-z]{2,4}$", $_POST['email'])):
print "<center>chybná e-mailová adresa</center>";
elseif ($_POST['text'] == ""):
print "<center>prázdne textové pole</center>";
else:
$zobrazitFormular = false;
$headers = "";
$to = $GLOBALS['infoform']; // platny e-mail v config.php
$subj = "Správa od ".$_POST['jmeno']."";
$mes = "Meno: ".$_POST['jmeno']."\nEmail: ".$_POST['email']."\nText:\n".$_POST['text']."";
// když je PHP direktiva magic_quotes_gpc nastavena na ON (default)
if (true == get_magic_quotes_gpc ()):
$subject = stripslashes($subj);
$mess1 = stripslashes($mes);
else:
// když je PHP direktiva magic_quotes_gpc nastavena na OFF
$subject = $subj;
$mess1 = $mes;
endif;
/*
// převedení z windows-1250 do iso-8859-2 (pokud je potřeba)
$mess2 = StrTr($mess1,
"\x8A\x8D\x8E\x9A\x9D\x9E",
"\xA9\xAB\xAE\xB9\xBB\xBE");
// přidání hlaviček
// headers iso 8859-2
$headers .= "MIME-Version: 1.0\n".
"Content-Type: text/plain; charset=\"iso-8859-2\"\n".
"Content-Transfer-Encoding: base64\n";
*/
// headers windows-1250
$headers .= "MIME-Version: 1.0\n".
"Content-Type: text/plain; charset=\"windows-1250\"\n".
"Content-Transfer-Encoding: base64\n";
// Code_Base64
$mess = Base64_Encode($mess1); // v pripade prekodovani zmenit mess1 => mess2
$mess = Chunk_Split($mess);
@mail($to,$subject,$mess,$headers);
print '<p align="center"><b>Správa bola úspešne odoslaná. Ďakujeme Vám.</b></p>';
print '<p align="center"><b><a href="kontakt.php">Nazat na formulár</a> - <a href="index.php">Hlavná stránka</a></b></p>';
endif;
endif;
if (true == $zobrazitFormular):
?>
<fieldset>
<table width="100%" cellSpacing="0" cellPadding="0" border="0">
<tr><td align="center" valign="top">
<form action="kontakt.php" method="post">
<table width="250" border="0" class="text">
<tr><td class="z" align="right">Meno: </td><td><input type="text" name="jmeno" class="textpole" value="<?php print $_POST['jmeno'] ?>" size="37"></td></tr>
<tr><td class="z" align="right">Email: </td><td><input type="text" name="email" class="textpole" value="<?php print $_POST['email'] ?>" size="37"></td></tr>
<tr><td class="z" align="right" valign="top">Text: </td><td><textarea name="text" class="textpole" rows="10" cols="36"><?php print $_POST['text'] ?></textarea></td></tr>
<tr><td colspan="2" align="center"><input type="submit" class="tl" value="Odoslať"> <input type="reset" class="tl" value="Vymazať"></td></tr>
</table>
<input type="hidden" name="Odeslano" value="true">
</form>
</td></tr></table><br><br>
Napíšte nám čo by ste zmenili, pridali alebo obstánili na stránke www.stativ.sk<br>
Budeme sa snažiť vašim požiadavkám vyhovieť. <br> <br>
</fieldset>
<p> </p>
<?php
endif;
KonecObrTabulka();
$vzhledwebu->Generuj();
?>