function show_taches(id) { if (document.getElementById(id).style.display=='none') { document.getElementById(id).style.display=''; } else { document.getElementById(id).style.display='none'; } } function expand_taches_all() {"; foreach ($tasks->types_taches as $type_tache) { print "if (document.getElementById('".$type_tache->name."').style.display=='none') { document.getElementById('".$type_tache->name."').style.display=''; }"; } print "} function collapse_taches_all() {"; foreach ($tasks->types_taches as $type_tache) { print "if (document.getElementById('".$type_tache->name."').style.display=='') { document.getElementById('".$type_tache->name."').style.display='none'; } "; } print "} "; $pair_impair=0; $parity=0; //on affiche chaque type de tache foreach($tasks->types_taches as $type_tache) { $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 "\n"; print ""; } print "
  ".$msg["planificateur_type_task"]." ".$msg["planificateur_task"]."  
".($n_taches?"":" ")."".htmlentities($type_tache->comment,ENT_QUOTES,$charset)." ".$n_taches." ".$msg["planificateur_count_tasks"]."
"; } 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->save_global_properties(); } } } task_list(); break; case "task": $tasks=new taches(); switch ($subaction) { case "change": print $tasks->show_form_task($planificateur_id); break; case "save": foreach ($tasks->types_taches as $type_tache) { if ($type_tache->id_type == $type_task_id) { if (is_file($base_path."/admin/planificateur/".$type_tache->name."/".$type_tache->name.".class.php")) { require_once($base_path."/admin/planificateur/".$type_tache->name."/".$type_tache->name.".class.php"); eval("\$plan=new ".$type_tache->name."();"); $plan->save_property_form($planificateur_id); } } } task_list(); break; default : print $tasks->show_form_task($planificateur_id); } break; case "task_del": $tasks=new taches(); print $tasks->del_task($planificateur_id); break; default: task_list(); break; }