%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/alliance/domains/congress-eldw.eu/public_html/
Upload File :
Create Path :
Current File : /home/alliance/domains/congress-eldw.eu/public_html/p-contact.php

<?php
include_once("inc/config.php");
include_once("inc/functions.php");
include_once("inc/init.php");

//affichage du html
include("theme/html.php");
//affichage des metas
include("theme/meta.php");
echo "\n<title>Contact - ".$info_titresite."</title>\n";
//affichage du header
include("theme/header.php");
//colonne de droite
include("theme/droite.php");

?>

<article class="blanc padding">
<h1><?php echo lang('contactus'); ?></h1>

<?php

if(isset($_POST['post']) && $_POST['post'] == 1)
{
	$db = new BaseOps;
	$erreur = true;
	if (!$_POST['nom'])
	{
		$erreurtxt = ": ".lang("nom").lang("pasrempli");
		$erreur = false;
	}
	if (!$_POST['prenom'])
	{
		$erreurtxt = ": ".lang("prenom").lang("pasrempli");
		$erreur = false;
	}
	if (!$_POST['message'])
	{
		$erreurtxt = ": ".lang("texte").lang("pasrempli");
		$erreur = false;
	}
	if(!$_POST['email'])
	{
		$erreurtxt = ": ".lang("email").lang("pasrempli");
		$erreur = false;
	}
	else {
		$email_check = verifie_email($_POST['email']);
		if ($email_check != "ok")
		{
			$erreurtxt = ": ".lang("email").lang("pasbienrempli");
			$erreur = false;
		}
	}
	if ($erreur) // si pas d'erreurs
	{
		if($_POST['city']=="" && $_POST["email"]!="sample@email.tst" && stripos($_POST['message'], "[/link]")===false && stripos($_POST['message'], "[/url]")===false){
			// envoi du mail de validation
			$subject=utf8_decode("Message sur le site congress-eldw.eu");
			$headers= "From: ".$_POST['email']."\n";
			$headers.='Content-type: text/html; charset=utf-8';
			$message='';
			$message.=stripslashes("<p><strong>Message sur le site congress-eldw.eu,</strong></p><br />
			<p>De : ".$_POST['prenom']." ".$_POST['nom']." ".$_POST['societe']."</p>
			<p>N° de téléphone : ".$_POST['telephone']."</p>
			<p>Message :</p>
			<p>".nl2br($_POST['message'])."</p>");

			mail($email_contact, $subject, "
			<html>
			<head>
			 <title>Contact letter</title>
			</head>
			<body>
			<br>
			  ".$message."
			</body>
			</html>" , $headers);
			echo "<div class=\"infobloc\">Votre message à été envoyé</div>";
		}
	}
	else {
		echo "<div class=\"erreurbloc\">".lang("error")." ".$erreurtxt."</div>";
	}
}

?>
	<form action="<?php echo $lang->getlang(); ?>/contact/" method="post" class="form">
	<table>
		<tr>
			<td class="label"><?php echo lang("email"); ?> <span class="etoile">*</span></td>
			<td class="field"><input type="text" name="email" value="<?php echo $_POST['email']; ?>" /></td>
		</tr>
		<tr>
			<td class="label top"><?php echo lang("nom"); ?> <span class="etoile">*</span></td>
			<td class="field"><input type="text" name="nom" value="<?php echo $_POST['nom']; ?>" /></td>
		</tr>
		<tr>
			<td class="label top"><?php echo lang("prenom"); ?> <span class="etoile">*</span></td>
			<td class="field"><input type="text" name="prenom" value="<?php echo $_POST['prenom']; ?>" /></td>
		</tr>
		<tr>
			<td class="label top"><?php echo lang("societe"); ?></td>
			<td class="field"><input type="text" name="societe" value="<?php echo $_POST['societe']; ?>" /></td>
		</tr>
		<tr>
			<td class="label top"><?php echo lang("telephone"); ?></td>
			<td class="field"><input type="text" name="telephone" value="<?php echo $_POST['telephone']; ?>" /></td>
		</tr>
		<tr>
			<td class="label top"><?php echo lang("texte"); ?> <span class="etoile">*</span></td>
			<td class="field top"><textarea name="message"><?php echo $_POST['message']; ?></textarea></td>
		</tr>
	</table>
	<div class="form_bouton">
		<input type="hidden" name="post" value="1" />
		<input type="hidden" name="city" value="" />
		<input type="submit" class="bouton" id="maj_bouton" value="<?php echo lang("sendmess"); ?>" />
	</div>
</form>
</article>

<?

//affichage du footer
include("theme/footer.php");

?>

Zerion Mini Shell 1.0