évolution du code mais...
toujours pas ce que je veux :/
je remet le code avec son évolution
Code:
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
|
$results17 = mysql_query ($query17);
while ($rows17[] = mysql_fetch_array($results17));
mysql_free_result ($results17);
?>
<h4>Main Courante</h4>
<?php
include ("titre.php");
$paire = 0;
reset ($rows17);
foreach ($rows17 as $row17) {
if ($row17['dbtimestamp_log']!="") {
list($chaine,$script) = explode(";",preg_replace("#(.*?)([^/]+)/(?:bin/)?([^/]*?)$#i","\\2;\\3",$row17["script_log"]));
?>
<tr class="<?php echo ($paire==1?"paire":"impaire"); ?>" style="color:<?php echo ($row17["Duree"]!=''?($row17["returncode_log"]==0?"green":($row17["returncode_log"]<16?"orange":"red")):"black"); ?>">
<td>
<?php
if ($row17["jobname_log"] =="")
{
echo 'Job UNIX';
}
else
{
echo $row17["jobname_log"];} ?></td>
<td><?php echo ($row17["dbendstamp_log"]!='0000-00-00 00:00:00'?$row17["dbendstamp_log"]:"En cours"); ?></td>
<td><?php echo ($script!=""?$chaine:"PATH"); ?></td>
<td><?php echo ($script!=""?$script:$chaine); ?></td>
<td title="<?php echo $row17['args_log']?>"><?php echo substr($row17['args_log'],0,20).(strlen($row17['args_log'])>20?'...':''); ?></td>
</tr>
<?php
}
else
{
$compteur["$script_log"]=0;
if ($script !='pubMCourante.pl'){
echo "<tr><td colspan='5' valign='top'><b>pubMCourante n'a pas tourné</b></td></tr>";
$compteur["$script_log"]++;}
else{}
if ($script !='pubMCOpsim.pl'){
echo "<tr><td colspan='5' valign='top'><b>pubMCOpSim n'a pas tourné</b></td></tr>";
$compteur["$script_log"]++;}
else {}
if ($script !='pubMCourante.pl' && $script !='pubMCOpsim.pl'){
echo "<tr><td colspan='5' valign='top'><b>pubMCourante et pubMCopSim n'ont pas tourné</b></td></tr>";}
else{}
else{
}
}
$paire = (abs($paire-1));
}; |
et en rouge la partie incriminée :yaisse2: