function task_list() { global $base_path, $msg, $charset, $type_task_id; $tasks = new taches(); print "\n\t\t<script type='text/javascript'>\n\t\t\tfunction show_taches(id) {\n\t\t\t\tif (document.getElementById(id).style.display=='none') {\n\t\t\t\t\tdocument.getElementById(id).style.display='';\n\t\t\t\t} else {\n\t\t\t\t\tdocument.getElementById(id).style.display='none';\n\t\t\t\t}\n\t\t\t}\n\t\t\tfunction expand_taches_all() {"; foreach ($tasks->types_taches as $type_tache) { print "if (document.getElementById('" . $type_tache->name . "').style.display=='none') {\n\t\t\t\t\t\tdocument.getElementById('" . $type_tache->name . "').style.display='';\n\t\t\t\t\t}"; } print "}\n\t\t\tfunction collapse_taches_all() {"; foreach ($tasks->types_taches as $type_tache) { print "if (document.getElementById('" . $type_tache->name . "').style.display=='') {\n\t\t\t\t\t\tdocument.getElementById('" . $type_tache->name . "').style.display='none';\n\t\t\t\t\t} "; } print "}\n\t\t</script>\n\t\t<script type='text/javascript' src='" . $base_path . "/javascript/tablist.js'></script>\n\t\t<a href='javascript:expand_taches_all()'><img border='0' id='expandall' src='./images/expand_all.gif'></a>\t\t\n\t\t<a href='javascript:collapse_taches_all()'><img border='0' id='collapseall' src='" . $base_path . "/images/collapse_all.gif'></a>\n\t\t<table>\n\t\t\t<tr>\n\t\t\t\t<th> </th>\n\t\t\t\t<th>" . $msg["planificateur_type_task"] . "</th>\n\t\t\t\t<th>" . $msg["planificateur_task"] . "</th>\n\t\t\t\t<th> </th>\n\t\t\t</tr>"; $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 "<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>"; }
function reporting_list() { global $base_path, $msg, $charset, $act; $tasks = new taches(); print "<script>\n\t\t\tfunction show_docsnum(id) {\n\t\t\t\tif (document.getElementById(id).style.display=='none') {\n\t\t\t\t\tdocument.getElementById(id).style.display='';\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\tdocument.getElementById(id).style.display='none';\n\t\t\t\t}\n\t\t\t} \n\t\t</script>\n\t\t<script type=\"text/javascript\" src='" . $base_path . "/javascript/select.js'></script>\n\t\t<script>\n\t\t\tvar ajax_get_report=new http_request();\n\t\t\t\n\t\t\tfunction get_report_content(task_id,type_task_id) {\n\t\t\t\tvar url = './ajax.php?module=ajax&categ=planificateur&sub=get_report&task_id='+task_id+'&type_task_id='+type_task_id;\n\t\t\t\t ajax_get_report.request(url,0,'',1,show_report_content,0,0); \n\t\t\t}\n\t\t\t\n\t\t\tfunction show_report_content(response) {\n\t\t\t\tdocument.getElementById('frame_notice_preview').innerHTML=ajax_get_report.get_text();\n\t\t\t}\n\t\t\t\n\t\t\tfunction refresh() {\n\t\t\t\tvar url = './ajax.php?module=ajax&categ=planificateur&sub=reporting';\n\t\t\t\tajax_get_report.request(url,0,'',1,refresh_div,0,0); \n\t\t\t\t\n\t\t\t}\n\t\t\tfunction refresh_div() {\n\t\t\t\tdocument.getElementById('table_reporting', true).innerHTML=ajax_get_report.get_text();\n\t\t\t\tvar timer=setTimeout('refresh()',20000);\n\t\t\t}\n\t\t\t\n\t\t\tvar ajax_command=new http_request();\n\t\t\tvar tache_id='';\n\t\t\tfunction commande(id_tache, cmd) {\n\t\t\t\ttache_id=id_tache;\n\t\t\t\tvar url_cmd = './ajax.php?module=ajax&categ=planificateur&sub=command&task_id='+tache_id+'&cmd='+cmd;\n\t\t\t\tajax_command.request(url_cmd,0,'',1,commande_td,0,0); \n\t\t\t}\n\t\t\tfunction commande_td() {\n\t\t\t\tdocument.getElementById('commande_tache_'+tache_id, true).innerHTML=ajax_command.get_text();\n\t\t\t}\n\t\t</script>\n\t\t<script type='text/javascript'>var timer=setTimeout('refresh()',20000);</script>"; $tasks->get_tasks_plan(); }
$report_task = "Contenu non disponible"; ajax_http_send_response($report_error); // ajax_http_send_error('400',$msg['error_message_invalid_date']); return; } } switch ($sub) { case 'get_report': print show_rapport(); break; case 'reporting': $tasks = new taches(); $tasks->get_tasks_plan(); break; case 'command': $tasks = new taches(); print $tasks->command_waiting($task_id, $cmd); break; // case 'source_synchro': // if ($id) { // if ($planificateur_id) { // $sql = "select param from planificateur where id_planificateur=".$planificateur_id; // $res = mysql_query($sql); // // $params = mysql_result($res,0,"param"); // } else { // $params =""; // } // $contrs=new connecteurs(); // require_once($base_path."/admin/connecteurs/in/".$contrs->catalog[$id]["PATH"]."/".$contrs->catalog[$id]["NAME"].".class.php"); // eval("\$conn=new ".$contrs->catalog[$id]["NAME"]."(\"".$base_path."/admin/connecteurs/in/".$contrs->catalog[$id]["PATH"]."\");");