<br />
<div id="capitol">Contact</div>
<br /><br />
<?php
echo '
<TABLE align="center" width="100%" cellspacing="8">
	<TR>
		<TD id="chenar" align="center">
			<h3>Date de contact</h3>
			<div id="alineat">Telefon: <a href="tel:+40743281424">0743 281 424 (<font color="red">Suna acum</font>)</a></div>
			<div id="alineat">Telefon: <a href="tel:+40730696610">0730 696 610 (<font color="red">Suna acum</font>)</a></div>
			<div id="alineat">Telefon: <a href="tel:+40734427701">0734 427 701 (<font color="red">Suna acum</font>)</a></div>
			<div id="alineat">Telefon: <a href="tel:+40766903909">0766 903 909 (<font color="red">Suna acum</font>)</a></div>
			<div id="alineat">Email: contact@alexfuneraregiurgiu.ro</div>
			<div id="alineat">
					<a href="https://www.facebook.com/profile.php?id=100075964995004" target="_blank">Facebook: Alex Funerare Giurgiu  (<font color="red">Apasa</font>)</a>
			</div>
			<div id="alineat">Coordonate GPS: </div>
			<div id="alineat">
					<a href="https://www.google.com/maps?q=43.886192321777344,25.953975677490234&z=17&hl=ro" target="_blank">1 - Jud Giurgiu, Loc. Giurgiu, Bulevardul 1907 nr 61 (<font color="red">Harta</font>)</a>
			</div>
			<div id="alineat">
					<a href="https://maps.google.com/maps?q=43.8939208984375%2C25.960676193237305&z=17&hl=ro" target="_blank">2 - Jud Giurgiu, Loc. Giurgiu, Strada Garii nr 95 (<font color="red">Harta</font>)</a>
			</div>
			<div id="alineat">
					<a href="https://maps.google.com/maps?q=43.90436935424805%2C25.977262496948242&z=17&hl=ro" target="_blank">3 - Jud Giurgiu, Loc. Giurgiu, B-dul Academician Miron Nicolescu  nr 1 B (<font color="red">Harta</font>)</a>	
			</div>
			<div id="alineat">
					<a href="https://goo.gl/maps/NK5ER51X6NWdrTw56" target="_blank">4 - Jud Giurgiu, Com Toporu, Str Principala Nr. 159 (<font color="red">Harta</font>)</a>
			</div>
			<br /><br /><br /><br /><br /><br />
		</TD>
		<TD id="chenar" align="center">
		<div id="formular">
<CENTER><h3>Formular de contact</h3></CENTER>
<TABLE align="center">
	<form action="index.php?url=contact-servicii-funerare-complete-giurgiu" method="post">
		<TR>
			<TD width="190px" align="left">Nume si prenume :</TD>
			<TD><input id="camp" type="text" name="name" size="60"><BR></TD>
		</TR>
		<TR>
			<TD align="left">Adresa de email : </TD>
			<TD><input id="camp" type="text" name="email" size="60"><BR></TD>
		</TR>
		<TR>
			<TD align="left">Nr telefon : </TD>
			<TD><input id="camp" type="text" name="phone" size="60"></TD>
		</TR>
		<TR>
			<TD align="left">Localitate : </TD>
			<TD><input id="camp" type="text" name="oras" size="60"></TD>
		</TR>
		<tr>
			<td align="left">Solicitare :</td>
			<td><textarea id="textarea" name="detalii"></textarea></td> 
		</tr> 
		<TR>
			<TD align="center" colspan="2" >Toate campurile sunt obligatorii !</TD>
		</TR>
		<TR>
			<TD align="center" colspan="2" ><input id="submit" type="submit" name="submit" value="Trimite solicitare"></TD>
		</TR>
	</form>
</TABLE>
</div>
		</TD>
	</TR>
</TABLE>
';


if($_POST['submit']){

$to = "contact@alexfuneraregiurgiu.ro";

if(($_POST['name']!= "")&&($_POST['email']!= "")&&($_POST['phone']!= "")&&($_POST['oras']!= "")&&($_POST['detalii']!= "")){
	
	$subject = 'Solicitare de la site';
	$headers = 'MIME-Version: 1.0'."\r\n";
	$headers .= 'Content-type: text/html; charset=iso-8859-1'."\r\n";
	$headers .= 'From: '.$_POST['email'].''."\r\n";

	$content = '
		<TABLE width="800px" align="center" border="1" bgcolor="#ffffff" cellspacing="0" cellpadding="8">
				<TR>
					<TD width="200px" align="left"><b>Data :</b></TD>
					<TD><b>'.date("d-m-Y H:i:s").'</b></TD>
				</TR>
				<TR>
					<TD width="200px" align="left">Nume si prenume :</TD>
					<TD>'.$_POST['name'].'</TD>
				</TR>
				<TR>
					<TD align="left">Adresa de email : </TD>
					<TD>'.$_POST['email'].'</TD>
				</TR>
				<TR>
					<TD align="left">Nr telefon : </TD>
					<TD>'.$_POST['phone'].'</TD>
				</TR>
				<TR>
					<TD align="left">Localitate : </TD>
					<TD>'.$_POST['oras'].'</TD>
				</TR>
				<tr>
					<td align="left">Solicitare :</td>
					<td>'.$_POST['detalii'].'</td>
				</tr> 
		</TABLE>';
	
	mail($to , $subject, $content, $headers );
	
	echo "<script>alert('Solicitare trimisa cu succes . Va vom raspunde in cel mai scurt timp. Va multumim !')</script>";
}else{
	echo "<script>alert('Solicitare esuata ! Mesajul nu este complet ! Va rugam verificati. ')</script>";
}
echo "<script>location.replace('index.php?url=contact-servicii-funerare-complete-giurgiu')</script>";
}
?>