$error='0';
if ($_GET[action]=='kontakt')
{
$typ=$_POST[typ];
$imie=$_POST[imie];
$temat=$_POST[temat];
$email=$_POST[email];
$telefon=$_POST[telefon];
$wiadomosc=$_POST[wiadomosc];
$error='0';
$error_tab=array();
if ($typ=='1') $typ_txt='Elektryka';
elseif ($typ=='2') $typ_txt='Hydraulika';
elseif ($typ=='3') $typ_txt='Biuro';
$tresc= 'Typ:'.$typ_txt.'
Imie:'.$_POST[imie].'
E-mail: '.$_POST[email].'
Telefon: '.$_POST[telefon].'
Temat: '.$_POST[temat].'
Pytanie: '.$_POST[wiadomosc];
if ($_POST[imie]!='') { } else { $error='1'; $error_tab[1]='1';}
if ($_POST[email]!='') { } else { $error='1'; $error_tab[2]='1';}
if ($_POST[telefon]!='') { } else { $error='1'; $error_tab[5]='1';}
if (strlen($_POST[temat])!='') { } else { $error='1'; $error_tab[3]='1';}
$dokogo='info@bsservice.eu';
$to = $dokogo;;
$subject = 'Kontakt z www';
$message = $tresc;
$headers = 'From: info@bsservice.eu' . "\r\n" .
'Reply-To: info@bsservice.eu' . "\r\n" .
'Content-Type: text/html; charset=utf-8' . "\r\n" .
'X-Mailer: PakietyCMS/' . phpversion();
if ($error=='0')
{
mail($to, $subject, $message, $headers);
header("Location: index.php?action=send_done");
}
}
?>
$css_time=microtime(); ?>

