예제 #1
0
	}
}
if (file_exists('../modules/ntp/class.ntp.php')) {
	include '../modules/ntp/class.ntp.php';
	$ntp = new ntp;
	if (!$module->activated('ntp') && $initmod) {
		$ntp->init_sql();
		$ntp->init_menu();
		$ntp->init_deps();
		$ntp->init_lang();
		$ntp->init_help();
	}
}
if (file_exists('../modules/ntp_report/class.ntp_report.php')) {
	include '../modules/ntp_report/class.ntp_report.php';
	$ntp_report = new ntp_report;
	if (!$module->activated('ntp_report') && $initmod) {
		$ntp_report->init_sql();
		$ntp_report->init_menu();
		$ntp_report->init_deps();
		$ntp_report->init_lang();
		$ntp_report->init_help();
	}
}
if (file_exists('../modules/occupation/class.occupation.php')) {
	include '../modules/occupation/class.occupation.php';
	$occupation = new occupation;
	if (!$module->activated('occupation') && $initmod) {
		$occupation->init_sql();
		$occupation->init_menu();
		$occupation->init_deps();
예제 #2
0
 function _ntp_report()
 {
     //
     // main submodule for generating stats
     //
     // always check dependencies
     if ($exitinfo = $this->missing_dependencies('ntp_report')) {
         return print $exitinfo;
     }
     if (func_num_args() > 0) {
         $arg_list = func_get_args();
         $menu_id = $arg_list[0];
         $post_vars = $arg_list[1];
         $get_vars = $arg_list[2];
         $validuser = $arg_list[3];
         $isadmin = $arg_list[4];
         //print_r($arg_list);
     }
     print "<span class='patient'>" . FTITLE_NTP_REPORTS . "</span><br/><br/>";
     $n = new ntp_report();
     $g = new graph();
     $n->report_menu($menu_id, $post_vars, $get_vars);
     print "<table><tr><td>";
     // column 1
     switch ($get_vars["report_menu"]) {
         case "TCL":
             if ($post_vars["submitreport"]) {
                 $n->process_tcl_inclusive_dates($menu_id, $post_vars, $get_vars);
             }
             $n->form_tcl_inclusive_dates($menu_id, $post_vars, $get_vars);
             $n->display_tcl_inclusive_dates($menu_id, $post_vars, $get_vars);
             break;
         case "GRAPHS":
             $g->graph_menu($menu_id, $post_vars, $get_vars);
             switch ($get_vars["graph"]) {
                 case "LINE":
                     $get_vars["module"] = $this->module;
                     $g->graph_line($menu_id, $post_vars, $get_vars);
                     break;
                 case "BAR":
                     $get_vars["module"] = $this->module;
                     $g->graph_bar($menu_id, $post_vars, $get_vars);
                     break;
                 case "PIE":
                     $get_vars["module"] = $this->module;
                     $g->graph_pie($menu_id, $post_vars, $get_vars);
                     break;
             }
             break;
             break;
     }
     print "</td></tr></table>";
 }