$pair_impair = $parity++ % 2 ? "even" : "odd"; //recherche du nombre de tâches planifiées $n_taches = $tasks->get_nb_tasks($type_tache->id_type); $tr_javascript = " onmouseover=\"this.className='surbrillance'\" onmouseout=\"this.className='{$pair_impair}'\" onmousedown=\"if (event) e=event; else e=window.event; if (e.srcElement) target=e.srcElement; else target=e.target; if ((target.nodeName!='IMG')&&(target.nodeName!='INPUT')) document.location='./admin.php?categ=planificateur&sub=manager&act=modif&type_task_id=" . $type_tache->id_type . "';\" "; print "<tr class='{$pair_impair}' {$tr_javascript} style='cursor: pointer' title='" . htmlentities($type_tache->comment, ENT_QUOTES, $charset) . "' alter='" . htmlentities($type_tache->comment, ENT_QUOTES, $charset) . "' id='tr" . $type_tache->id_type . "'><td>" . ($n_taches ? "<img src='images/plus.gif' class='img_plus' onClick='if (event) e=event; else e=window.event; e.cancelBubble=true; if (e.stopPropagation) e.stopPropagation(); show_taches(\"" . addslashes($type_tache->name) . "\"); '/>" : " ") . "</td><td>" . htmlentities($type_tache->comment, ENT_QUOTES, $charset) . "</td>\n\t\t\t<td>" . $n_taches . " " . $msg["planificateur_count_tasks"] . "</td><td style='text-align:right'><input type='button' value='" . $msg["planificateur_task_add"] . "' class='bouton_small' onClick='document.location=\"admin.php?categ=planificateur&sub=manager&act=task&type_task_id=" . $type_tache->id_type . "\"'/></td></tr>\n"; print "<tr class='{$pair_impair}' style='display:none' id='" . $type_tache->name . "'><td> </td><td colspan='3'><table style='border:1px solid'>"; $tasks->get_tasks($type_tache->id_type); print "</table></td></tr>"; } print "</table>"; } switch ($act) { case "modif": if ($type_task_id) { $tasks = new taches(); print $tasks->show_type_task_form($type_task_id); } break; case "update": $tasks = new taches(); foreach ($tasks->types_taches as $type_tache) { if ($type_tache->id_type == $type_task_id) { require_once $base_path . "/admin/planificateur/" . $type_tache->name . "/" . $type_tache->name . ".class.php"; eval("\$plan=new " . $type_tache->name . "();"); if ($plan) { $plan->id_type = $type_task_id; $plan->timeout = $timeout; $plan->histo_day = $histo_day; $plan->histo_number = $histo_number; $plan->restart_on_failure = $restart_on_failure ? "1" : "0"; $plan->alert_mail_on_failure = ($alert_mail_on_failure ? "1" : "0") . ($mail_on_failure ? "," . $mail_on_failure : "");