Files
2020-01-27 08:56:08 +01:00

117 lines
4.6 KiB
PHP

<?php
include_once(realpath(dirname(__FILE__)) . "/../../../fonctions/authplugins.php");
autorisation("contact");
include_once(realpath(dirname(__FILE__)) . "/Contact.class.php");
$id = $_REQUEST["id"];
$contact = new Contact();
$contact->charger($id);
if(!$contact->lu){
$contact->lu = 1;
$contact->maj();
}
?>
<style>
.respond {
float:right;
cursor:pointer;
padding:2px 4px 2px 4px;
font-size:12px;
color:#0D0;
background:#777;
}
.submitSpan {
float:right;
cursor:pointer;
padding:2px 4px 2px 4px;
font-size:12px;
color:#0D0;
background:#777;
}
.traduire {
cursor:pointer;
}
</style>
<script type="text/javascript">
$(document).ready(function(){
$(".respond").click(function(){
$(".respond").replaceWith( "<form name=\"reply\" method=\"post\" action=\"module.php?nom=contact&vue=listing&request=reply\"><input type=\"hidden\" name=\"nomf\" value=\"<?php echo $contact->nom; ?>\"><input type=\"hidden\" name=\"email\" value=\"<?php echo $contact->email; ?>\"><input type=\"hidden\" name=\"tel\" value=\"<?php echo $contact->tel; ?>\"><input type=\"text\" id=\"sujet\" name=\"sujet\" size=\"52\" value=\"RE: <?php echo $contact->sujet; ?>\"><br /><textarea id=\"remsg\" name=\"remsg\" cols=\"52\" rows=\"20\">Ecrire le message de retour</textarea><br /><span class=\"submitSpan\">ENVOYER</span></form>" );
$("#remsg").val("Bonjour,\r\n\r\nNous allons essayer de répondre à votre question.\r\n\r\nCordialement:\r\n\r\nLe service client\r\nwww.lematelot.com\r\n-------------------------------------------------\r\n\r\n"+$(".txtmsg").text());
});
$(self).focus();
$(".submitSpan").live('click',function(){
$(this).closest('form').submit();
});
$(".traduire").click(function(){
var langue = this.id;
var mess = $(".txtmsg").text();
window.open('https://translate.google.fr/?hl=fr#'+langue+'/fr/'+encodeURIComponent(mess)+'');
return false;
});
});
</script>
<div id="contenu_int">
<p align="left"><span class="lien04"><a href="accueil.php" class="lien04">Accueil</a></span> <img src="gfx/suivant.gif" width="12" height="9" border="0" /><a href="module_liste.php" class="lien04">Modules</a> <img src="gfx/suivant.gif" width="12" height="9" border="0" /><a href="module.php?nom=contact" class="lien04"> Gestion des contacts</a></p>
<div id="bloc_description">
<!-- bloc entete de la rubrique -->
<div class="entete_liste_config">
<div class="titre">MESSAGE DU CONTACT</div>
<div class="fonction_valider"><a href="module.php?nom=contact">RETOUR</a></div>
</div>
<table width="100%" cellpadding="5" cellspacing="0">
<tr class="claire">
<th width="133" class="designation" style="height:30px; padding-top:10px;">Nom</th>
<th style="padding-top:10px;"><?php echo $contact->nom; ?></th>
</tr>
<tr class="fonce">
<td class="designation">Pr&eacute;nom</td>
<td><?php echo $contact->prenom; ?></td>
</tr>
<tr class="claire">
<td class="designation">E-mail<br /></td>
<td><?php echo $contact->email; ?></td>
</tr>
<tr class="fonce">
<td class="designation">Adresse<br /></td>
<td><?php echo $contact->adresse; ?></td>
</tr>
<tr class="fonce">
<td class="designation">Code postal<br /></td>
<td><?php echo $contact->cpostal; ?></td>
</tr>
<tr class="fonce">
<td class="designation">Ville<br /></td>
<td><?php echo $contact->ville; ?></td>
</tr>
<tr class="fonce">
<td class="designation">Téléphone<br /></td>
<td><?php echo $contact->tel; ?></td>
</tr>
<tr class="claire">
<td class="designation">date<br /></td>
<td><?php echo $contact->date; ?></td>
</tr>
<tr class="fonce">
<td class="designation">Sujet<br /></td>
<td><?php echo $contact->sujet; ?></td>
</tr>
<tr class="claire">
<td class="designation">Message<br /></td>
<td><span class="txtmsg"><?php echo nl2br($contact->message); ?></span></td>
</tr>
<tr class="fonce">
<td class="designation"></td>
<td>TRADUCTION <span id="en" class="traduire"><img src="../../../admin_FN5APhpBzO/gfx/flags/flag_royaumeunis.gif" width="21" height="21" alt="Anglais" /></span> <span id="es" class="traduire"><img src="../../../admin_FN5APhpBzO/gfx/flags/flag_espagne.gif" width="21" height="21" alt="Espagnol" /></span> <span id="it" class="traduire"><img src="../../../admin_FN5APhpBzO/gfx/flags/flag_italie.gif" width="21" height="21" alt="Italien" /></span> <span id="de" class="traduire"><img src="../../../admin_FN5APhpBzO/gfx/flags/flag_allemagne.gif" width="21" height="21" alt="Allemand" /></span><span class="respond">REPONDRE</span></td>
</tr>
</table>
</div>
</div>