Problème tableau syslog GLPI

Fermé
harrymagic - Modifié par harrymagic le 27/10/2010 à 12:46
Bonjour,

Je viens actuellement de personnalisez une interface GLPI pour un système de syslog le problème c'est qu'il me répète l'entête du tableau a chaque ligne du post DB or je souhaite laissez l'entête juste au début du tableau.

entête= balise <tr></tr>

question : comment faire un return des <tr> juste sur la première ligne?

voici le code:

case "logs.msg" :
$out= resume_text(nl2br(utf8_encode($data["msg"])),1000);
$chars = preg_split('/ /', $out, -1);
$charssub = preg_split('/"/', $out, -1);
$str11 = array("=", "aktype", "proto", "time", "result", "sent", "src", "srcname", "dstname", "name", "subject", "\"", "<", ">");
$chars_replace = str_replace ($str11, "", $chars);
$result =
"<table border='1px' bordercolor='#000000'>".
"<tr>
<th width='200px'>Date</th>
<th width='200px'>Time</th>
<th width='200px'>fw</th>
<th width='200px'>Priorite</th>
<th width='200px'>Type</th>
<th width='200px'>Protocole</th>
<th width='200px'>Source</th>
<th width='200px'>Envoi(s)</th>
<th width='200px'>Source Name</th>
<th width='200px'>Destination Name</th>
<th align='center' width='800px'>Sujet</th>
<th align='center' width='200px'>Result</th>
<th align='center' width='200px'>Reason</th>
<th align='center' width='300px'>Rule</th>
</tr>
<td align='center'>".$chars_replace[4]."</td>
<td align='center'>".$chars_replace[5]."</td>
<td align='center'>".$chars_replace[7]."</td>
<td align='center'>".$chars_replace[8]."</td>
<td align='center'>".$chars_replace[9]."</td>
<td align='center'>".$chars_replace[10]."</td>
<td align='center'>".$chars_replace[12]."</td>
<td align='center' >".$chars_replace[13]."</td>
<td align='center'>".$chars_replace[14]."</td>
<td align='center'>".$chars_replace[15]."</td>
<td align='center'>".$charssub[7]."</td>
<td align='center'>".$charssub[9]."</td>
<td align='center'>".$charssub[11]."</td>
<td align='center'>".$charssub[13]."</td>
</table>";
return $result;
break;

Merci à tous pour votre aide.