1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
| <script type="text/javascript" src="fckeditor/fckeditor.js"></script> <!-- Editeur de texte -->
<script type="text/javascript">
window.onload = function()
{
var oFCKeditor1 = new FCKeditor('texte');
oFCKeditor1.ToolbarSet = "Basic" ;
oFCKeditor1.BasePath = "fckeditor/" ;
oFCKeditor1.Width = '650' ;
oFCKeditor1.Height = '500' ;
oFCKeditor1.ReplaceTextarea() ;
}
</script>
<?php
if (isset($_GET['quest']))
{
$num=$_GET['quest'];
$req="SELECT NUMQUEST,NUMREP,DATE,question.NUMMAIL,SUJET,TEXTE,NOM,PRENOM,mail.MAIL
FROM question, util_quest, mail
WHERE question.NUMMAIL = util_quest.NUMMAIL
AND mail.NUMMAIL = util_quest.NUMMAIL
AND NUMQUEST = '".$num."';";
$exec = mysql_query($req) or die("La requéte a échoué car ". mysql_error() .".");
while ($ligne = mysql_fetch_assoc($exec))
{
$numquest=$ligne['NUMQUEST'];
$date=$ligne['DATE'];
$sujet=$ligne['SUJET'];
$texte=$ligne['TEXTE'];
echo '<table width="749" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<th width="133" height="24" background="../images/fond-badeau-titre.gif" scope="col"><div align="left"><span class="dates">'.$date.'</span></div></th>
<th width="609" background="../images/badeau-titre.gif" scope="col"><div align="right" class="titre2">'.$sujet.'</div></th>
<th width="7" background="../images/fond2-badeau-titre.gif" scope="col"></th>
</tr>
</table>
<table width="749" border="0" align="center" cellpadding="10" cellspacing="0">
<tr>
<th scope="col"><p>'.$texte.'</p></th>
</tr>
</table></ br>';
}
}
else // On vide le formulaire pour la réponse
{
$texte = '';
$numquest = 0;
$sujet=''; // Indique que ce n'est pas une modification
}
/* <table width="749" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<th width="269" height="24" background="../images/fond-badeau-titre.gif" scope="col"><div align="right" class="titre2">
<div align="center"><a href="index.php?supprimer='.$numquest.'" class="titre2" style="text-decoration:none" >[Supprimer]</a></div>
</div></th>
<th width="270" background="../images/badeau-titre.gif" scope="col"><div align="right" class="titre2">
<div align="center"><a href="index.php?repondre='.$numquest.'" class="titre2" style="text-decoration:none" >[Répondre]</a></div>
</div></th>
<th width="1" background="../images/fond2-badeau-titre.gif" scope="col"></th>
</tr>
</table><br />';
*/
?>
<form name="form1" method="post" action="postForm.php">
<table width="749" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<th width="749" height="24" background="../images/fond-badeau-titre.gif" scope="col"><div align="left"><span class="dates">Répondre</span></div></th>
</th>
</tr>
</table>
<table width="749" border="0" align="center" cellpadding="10" cellspacing="0">
<tr>
<td width="103" height="40">Question :</td>
<td height="40" colspan="3"><input type="text" name="question" size="90" value="<?php echo $sujet; ?>"/></td>
</tr>
<tr>
<td height="19" colspan="4">Réponse :
<input name="numquest" type="hidden" value="<?php echo $numquest; ?>"></td>
</tr>
<tr>
<td colspan="4"><textarea id="texte" name="texte" type="text" cols="70" rows="10" ></textarea></td>
</tr>
<tr>
<td colspan="4"> </td>
</tr>
<tr>
<td colspan="2"><input type="submit" name="repondre" value="Répondre"></td>
<td width="163"><input type="button" name="Annuler" value="Annuler" onClick="javascript:history.go(-1)"></td>
<td width="422">
</td>
</tr>
</table>
</form> |
Partager