Ejemplo n.º 1
0
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();
}
Ejemplo n.º 2
0
        }
    } else {
        // contenu non disponible
        $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 ="";
        //			}