j'ai fait ce site et j'ai un probleme avec et uniquement internet explore
ca fait 2 jours que je resace le code et je le trouve bon

je vous met tout mon code
http://allomamannounou.free.fr/service/forum/index.php

Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
 
 
 
<?php ob_start(); ?>
<HTML>
<head>
<title>trouver une baby sister pres de votre domicile</title>
<link rel="stylesheet" type="text/css" href="../../Scripts/Styles.css">
<LINK REL="stylesheet" TYPE="text/css" HREF="../../Scripts/services.css">
</head>
<body>
<br />
<!-- creation du haut du tabeau -->
<table id="haut_tableau" cellSpacing="0" cellPadding="0" width="770" align="center" border="0">
  <tr>
    <td width="410" height="70"><a href="../../index.php"><img height="70" alt="Allo Maman nounou" src="../../images/layout/logo.JPG" width="195" border="0"></a><img height="70" alt="Aide Les Parents A Trouver Une BabySister, Et une Nounou A trouver Un enfants A Garder" src="../../images/layout/titre_rose.JPG" width="215" border="0"></td>
    <!--mise en place de la date format francais -->
    <td width="360" height="70"><table id="tableau-date_&_compte_client" cellSpacing="0" cellPadding="0" width="360" border="0">
        <tr>
          <td colSpan="3"><table cellpadding="0" cellspacing="0" border="0" width="100%">
              <tr>
                <td width="90" align="right"></td>
                <td align="right"><font color="#737373" size="2"><span id="Header_lblCurrentDate">
                  <?php
$date = date("d-m-Y");
$heure = date("H:i");
Print("$date, $heure");
?>
                  </span></font></td>
              </tr>
            </table></td>
          <td><img height="44" src="../../images/layout/spacer.gif" width="1"></td>
        </tr>
        <tr>
          <td vAlign="top" align="left" width="26" height="26">&nbsp;</td>
          <td vAlign="top" align="center"height="26"></td>
          <td align="center" height="26">&nbsp;</td>
          <td vAlign="top" align="right" width="26" height="26">&nbsp;</td>
        </tr>
      </table></td>
  </tr>
</table>
<table id="tablau_menu" cellSpacing="0" cellPadding="0" width="770" align="center" border="0">
  <tr height="32">
    <td height="32" valign="top"><script type="text/javascript" src="../../menu/milonic_src.js"></script>
      <script type="text/javascript">
<!-- 
if(ns4)_d.write("<script language=JavaScript src=../../menu/mmenuns4.js><\/script>"); 
else _d.write("<script language=JavaScript src=../../menu/mmenudom.js><\/script>"); 
-->
</script>
      <script type="text/javascript" src="../../menu/menu_data.js"></script>
    </td>
  </tr>
</table>
<table width="770" cellspacing="0" cellpadding="0" border="0" align="center" ID="Table2">
  <tr>
    <td width="593" colspan="2" valign="top" bgcolor="#FFFFFF"><?php
include("_conn.php");
 
// Destruction d'un topic
if($isAdmin && (@$_GET["deltopic"]!="")) {
        mysql_query("DELETE FROM $tb1 WHERE IDtopic=".$_GET["deltopic"]);
        mysql_query("DELETE FROM $tb3 WHERE ID=".$_GET["deltopic"]);
}
 
// Destruction de messages
if($isModo && (@$_GET["del"]!="")) {
        mysql_query("DELETE FROM $tb1 WHERE ID=".$_GET["del"]." OR reponse=".$_GET["del"]);
}
 
 
// Requête générique
$SQL1 = "SELECT $tb1.ID,reponse,$tb1.quand,login,email,titre,message,ismodo,IDuser,pied"
. " FROM $tb1 LEFT JOIN $tb2 ON $tb1.IDuser=$tb2.ID";
 
 
// === AJOUT DU MESSAGE EVENTUEL ===
 
if(@$_POST["message"]) {
 
        // Requête d'insertion (ID sera mis à jour automatiquement)
        $SQL = "INSERT into $tb1(quand,IDtopic,IDuser,message"
                . ",reponse,titre,pied) VALUES(" . time()
                . ",".$_GET["topic"]
                . ",".$user["ID"]
                . ",'".addslashes($_POST["message"])."'"
                . ",'".$_POST["reponse"]."'"
                . ",'".addslashes(@$_POST["titre"])."'"
                . ",'".addslashes($user["signature"])."'"
                . ")";
        mysql_query($SQL);
        // Réponse = n° auto si message initial
        $id = mysql_insert_id();
        if(!$_POST["reponse"]) {
                mysql_query("UPDATE $tb1"
                        . " SET reponse=".$id.",dernier=".$id." WHERE ID=".$id);
        // Mise à jour de l'ID du dernier post du sujet pour tri
        } else {
                mysql_query("UPDATE $tb1"
                        . " SET dernier=".$id." WHERE reponse=".$_POST["reponse"]);
        }
 
        // Envoi de la réponse par email
        if($_POST["reponse"]!="0") {
                // Sujet du mail
                $SQL = "SELECT titre FROM $tb1 WHERE ID="
                        . $_POST["reponse"];
                $res = mysql_query($SQL);
                $sujet = "Re: ".mysql_result($res,0,0);
                // Sélection des destinataires
                $SQL = $SQL1 . " WHERE reponse="
                        . $_POST["reponse"]." ORDER BY ID DESC";
                $res = mysql_query($SQL);
                // Ne pas envoyer à l'auteur de la réponse
                $temp=",".$user["email"].",";
                // Pour chaque adresse
                while($val=mysql_fetch_array($res)) {
                        // Déjà envoyé ?
                        if(!strpos(" ".$temp,",".$val["email"].",")) {
                                // Corps du message
$body = "Bonjour ".$val["login"].",\n\n"
        . "Un visiteur a repondu a votre message sur le forum :"
        . "\n".str_repeat("-",40)."\n"
        . $user["login"]." >> ".$_POST["message"]
        . "\n".str_repeat("-",40)."\n"
        . "\nen reponse a votre message du ".date("d/m/Y",$val["quand"])." :"
        . "\n".str_repeat("-",40)."\n"
        . $val["message"]
        . "\n".str_repeat("-",40)."\n"
        . "\nPour poursuivre la discussion, veuillez vous rendre a l'adresse\n"
        . "http://".$_SERVER["SERVER_NAME"].$_SERVER["SCRIPT_NAME"]
        . "?topic=".$_GET["topic"]."&post=".$_POST["reponse"]
        ."\n\nA bientot\n";
                                // Envoi du mail
                                sendMail($mailForum,$val["email"],$sujet,$body);
                                // mémorise l'adresse
                                $temp .= $val["email"] . ",";
                        }
                }
        }
        // Redirection
        mysql_close();
        Header("Location: ".$_SERVER["REQUEST_URI"]);
}
 
// === AFFICHAGE DE LA PAGE ===
 
// N° de la page
$page = @$_GET["page"]; if(!$page) $page="1";
 
include("_top.php"); ?>
      <table cellspacing=10 cellpadding=5 width=100%>
        <tr>
          <?php // === Affichage des messages ===
 
// Affichage des topics
if(!@$_GET["topic"]) {
 
        $maxPosts = 10; // Nbre max de msg/page
        $url = "index.php";
 
        // Comptage des topics
        $SQL = "SELECT count(*) FROM $tb3";
        $nbMsg = mysql_result(mysql_query($SQL),0,0);
        $nbPage = ceil($nbMsg/$maxPosts);
        if($page>$nbPage) $page=$nbPage;
        // Requête de sélection des topics
        $SQL = "SELECT count($tb1.ID),max($tb1.quand),$tb3.ID,$tb3.titre,detail FROM $tb1 RIGHT JOIN $tb3 ON $tb1.IDtopic=$tb3.ID"
                . " GROUP BY 3 ORDER BY 3 DESC"
                . " LIMIT ".($page-1)*$maxPosts.",".$maxPosts;
        $res = mysql_query($SQL);
        // Tant qu'il y a des topics
        while($val=mysql_fetch_array($res)) {
                echo "<dl><td class=msg><dt class=msg>";
                // Poubelle ?
                if($isAdmin) echo "<A href='".$url."?deltopic=".$val[2]."'>".$img_poub."</A>";
                echo "&nbsp;<A class=msg href='".$url."?topic=".$val[2]."'>".htmlentities($val[3])."</A></dt>"
                        . "<dd class=msg><A href='".$url."?topic=".$val[2]."'>".htmlentities($val[4])."</A></dd>"
                        . "</td></dl><td align=center width=100 nowrap class=msg><font class=f7>".$val[0]." message";
                if($val[0]>1) echo "s";
                echo "<br><br>";
                if($val[1]) echo date("d/m/y H:i",$val[1]);
                else echo "NOUVEAU";
                echo "</font></td></tr><tr>";
        }
 
// Affichage de la liste
} elseif(!@$_GET["post"]) {
 
        function crunch($tx,$lg) {
                $tmp = 0;
                if(strlen($tx)>$lg) $tmp = strpos($tx," ",$lg);
                if($tmp) $tx2 = substr($tx,0,$tmp);
                else $tx2 = substr($tx,0,$lg);
                if($tx2!=$tx) $tx2.=" ...";
                return $tx2;
        }
 
        $maxPosts = 20; // Nbre max de msg/page
        $url = "index.php?topic=".$_GET["topic"];
 
        // Affichage du topic
        $res=mysql_query($SQL = "SELECT titre,detail from $tb3 WHERE ID=".$_GET["topic"]);
        echo "<td><font class=titre>&lt;".htmlentities(mysql_result($res,0,0))."> </font>".htmlentities(mysql_result($res,0,1))."</td></tr><tr>";
 
        // Comptage des messages
        $SQL = "SELECT count(*) FROM $tb1 WHERE IDtopic=".$_GET["topic"];
        $nbMsg = mysql_result(mysql_query($SQL),0,0);
        $nbPage = ceil($nbMsg/$maxPosts);
        if($page>$nbPage) $page=$nbPage;
 
        // Requête de sélection des messages
        $SQL = $SQL1 . " WHERE IDtopic=".$_GET["topic"]." ORDER BY dernier DESC,ID"
                . " LIMIT ".($page-1)*$maxPosts.",".$maxPosts;
        $res = mysql_query($SQL); $i=0;
        echo "<dl><td class=msg>";
        // Tant qu'il y a des messages
        while($val=mysql_fetch_array($res)) { $i++;
                $temp = "";
                // Cas où on démarre d'une réponse > on réaffiche le sujet
                if(($i==1)&&($val["reponse"]!=$val["ID"])) {
                        $SQL = $SQL1 . " WHERE $tb1.ID=".$val["reponse"];
                        $val=mysql_fetch_array(mysql_query($SQL));
                        mysql_data_seek($res,0);
                }
                // Poubelle ?
                if($isModo && ($isAdmin||($user["ID"]==$val["IDuser"])||(($val["ismodo"]!="1")&&($val["IDuser"]!="1"))))
                        $temp.="<A href='".$url."&del=".$val["ID"]."'>".$img_poub."</A> ";
                // Nouveau sujet ?
                if($val["reponse"]==$val["ID"]) {
                        if($i>1) echo "</td></dl></tr><tr><dl><td class=msg>";
                        $temp.="<A class=msg href='".$url."&post=".$val["ID"]."'>";
                }
                // Ecrit la date du message
                $temp.="<span class=msgdate>"
                        .date("d/m/y H:i",$val["quand"])." </span>";
                // Ecrit le login de l'auteur
                $temp.= $val["login"] . " : ";
                // Ecrit le titre ou le début du message
                if($val["reponse"]==$val["ID"]) 
                        echo "<dt class=msg>".$temp.htmlentities($val["titre"]) . "</A></dt>";
                else
                        echo "<dd class=msg>"
                                .$temp.htmlentities(crunch($val["message"],70))."</dd>";
        }
        echo "</td></dl>";
 
// Affichage détaillé du sujet
} else {
 
        $maxPosts = 10; // Nbre max de msg/page
        $url = "index.php?topic=".$_GET["topic"]."&post=".$_GET["post"];
 
        // Affichage du topic
        $res=mysql_query($SQL = "SELECT titre,detail from $tb3 WHERE ID=".$_GET["topic"]);
        echo "<td colspan=2><font class=titre>&lt;".htmlentities(mysql_result($res,0,0))."> </font>".htmlentities(mysql_result($res,0,1))."</td></tr><tr>";
 
        // Comptage des messages
        $SQL = "SELECT count(*) FROM $tb1 WHERE reponse="
                . $_GET["post"];
        $nbMsg = mysql_result(mysql_query($SQL),0,0);
        $nbPage = ceil($nbMsg/$maxPosts);
        if($page>$nbPage) $page=$nbPage;
 
        // Requête de sélection des messages
        $SQL = $SQL1 . " WHERE reponse="
                . $_GET["post"] . " ORDER BY reponse DESC,ID"
                . " LIMIT ".($page-1)*$maxPosts.",".$maxPosts;
        $res = mysql_query($SQL);
        echo "<td><table>"; $i=0;
        // Tant qu'il y a des messages
        while($val=mysql_fetch_array($res)) { $i++;
                echo "<tr><td align=center class=".((($i>1)||($page>1))?"msg2":"msg1").">";
                // avatar
                if(file_exists($path_avatar.$val["IDuser"].".jpg"))
                        echo "<img src='".$path_avatar.$val["IDuser"].".jpg'><br>";
                else echo "<img src='".$path_avatar."0.jpg'><br>";
                if($isModo)
                        echo "<A href='mailto:".$val["email"]."'>".$val["login"]."</A>";
                else
                        echo $val["login"];
                // message
                echo "</td><td width=100% valign=top class=".((($i>1)||($page>1))?"msg2":"msg1").">";
                // Poubelle si Modo
                if($isModo && ($isAdmin||($user["ID"]==$val["IDuser"])||(($val["ismodo"]!="1")&&($val["IDuser"]!="1"))))
                        echo "<A href='".$url."&del=".$val["ID"]."'>".$img_poub."</A> ";
                // Ecrit la date du message
                echo "<span class=msgdate>"
                        .date("d/m/y H:i",$val["quand"])." </span>";
                // Ecrit le titre éventuel puis le message
                if($val["reponse"]==$val["ID"])
                        echo "<font class=msg>".htmlentities($val["titre"])."</font>";
                echo "<br>" . nl2br(htmlentities($val["message"]));
                if($val["pied"])
                        echo "<div><br><div class=signature>".$val["pied"]."</div></div>";
                echo "</td></tr>";
        }
        echo "</table></td>";
} 
 
// Barre de navigation
if($nbMsg>$maxPosts) {
        $temp= "</tr><tr class=navig><td align=center><table><tr><td width=60 nowrap>";
        if($page>1) {
                $temp.= "<A href='".$url."'>|<</A>&nbsp;&nbsp;&nbsp;&nbsp;";
                if($page>2) $temp.= "<A href='".$url."&page=".($page-1)."'><<</A>";
                else $temp.= "<A href='".$url."'><<</A>";
        }
        $temp.= "</td><td align=center nowrap>&nbsp;&nbsp;Page ";
        for($i=max(1,$page-5);$i<=min($nbPage,$page+5);$i++) {
                if($i==$page) $temp.= $i." ";
                else {
                        $temp.= "<A href='".$url;
                        if($i>1) $temp.= "&page=".$i;
                        $temp.= "'>".$i."</A> ";
                }
        }
        $temp.= "&nbsp;&nbsp;</td><td align=right width=60 nowrap>";
        if($nbMsg>$page*$maxPosts)
                $temp.= "<A href='".$url."&page=".($page+1)."'>>></A>&nbsp;&nbsp;"
                . "&nbsp;&nbsp;<A href='".$url."&page=".$nbPage."'>>|</A>";
        $temp.= "</td></tr></table></td>";
        echo str_replace("index.php&","index.php?",$temp);
}
?>
        </tr>
      </table>
      <br>
      <?php // Formulaire de saisie
        
if(!$isUser) { // identifié ? ?>
      <A href="log.php">Pour participer à ce forum vous devez être identifié !</A><br>
      <?php } elseif(@$_GET["topic"]) {
        
        if(!@$_GET["post"]||(mysql_num_rows($res)>0)) { ?>
      <SCRIPT language="JavaScript"><!--
		function repond(num) {
			test=true
			with(document.form1) {
				// vérification du champ message
				if(message.value=="") {
					alert("Le message est vide !")
					message.focus()
					test=false
				}
			<?php if(!@$_GET["post"]) { ?>
				// vérification du champ titre
				if(titre.value=="") {
					alert("Le titre est vide !")
					titre.focus()
					test=false
				}
			<?php } ?>
				reponse.value=num
				if(test) submit()
			}
		}
	--></SCRIPT>
      <table>
        <form method="post" action="index.php?topic=<?php echo $_GET["topic"];
                        if(@$_GET["post"]) {
                                // on retransmet le n° du sujet
                                echo "&post=".$_GET["post"];
                                // et éventuellement le n° de dernière page
                                if($nbMsg>=$maxPosts) echo "&page=".ceil(($nbMsg+1)/$maxPosts);
                        } ?>" name="form1">
          <?php if(!@$_GET["post"]) { ?>
          <tr>
            <td align=right>Titre</td>
            <td><input name="titre" size=60 maxlength=80></td>
          </tr>
          <?php } ?>
          <tr>
            <td align=right valign=top>Message</td>
            <td><textarea name="message" cols=60 rows=10></textarea>
            </td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td align=center><?php // Bouton "Nouveau" ou "Répondre" ?
                                        if(@$_GET["post"]) { ?>
              <input type="button" value="Répondre"
							onclick="repond(<?php echo $_GET["post"]?>)">
              <?php } else { ?>
              <input type="button" value="Nouveau sujet" onClick="repond(0)">
              <?php } ?>
              <input type="hidden" name="reponse" value="0">
            </td>
          </tr>
        </form>
      </table>
      <?php }
}
 
if(@$_GET["post"]) { ?>
      <br>
      <A href="index.php?topic=<?php echo $_GET["topic"]?>">Retour à la liste des sujets</A>
      <?php }
 
include("_btm.php"); ?>
      <?php ob_end_flush(); ?>
  </tr>
  <tr>
    <td width="177" height="27" background="../../images/layout/bkgd_left_white.gif" valign="bottom"
align="center"><img src="../../images/layout/bkgd_left_white_purple.gif" height="27" width="177"></td>
    <td width="593" colspan="2" height="27" background="../../images/layout/bkgd_right_wide.gif" align="center"><img src="../../images/layout/spacer.gif" height="1" width="593"><br>
      <font size="2"><br />
      <br />
      </font> </td>
  </tr>
</table>
<table width="770" cellspacing="0" cellpadding="0" border="0" align="center" ID="Table10">
  <tr>
    <td height="1" width="770" colspan="4"><img src="../../images/layout/bkgd_bottomborder_purple.gif" height="1" width="770" alt="End of Page Content"></td>
  </tr>
  <tr>
    <td width="626" height="26" align="right"><p>&nbsp;</p></td>
    <td width="26" height="26" align="left" valign="top"><img src="../../images/layout/bottomtab_left_purple.gif" height="26" width="26" alt="Text Size Menu"></td>
    <td width="92" height="26" background="../../images/layout/bottomtab_bkgd.gif" align="center"><p><img src="../../images/layout/spacer.gif" height="1" width="92"></p></td>
    <td width="26" height="26" align="right" valign="top"><img src="../../images/layout/bottomtab_right_purple.gif" height="26" width="26" alt="End Text Size Menu"></td>
  </tr>
</table>
<br>
</HTML>