}*/ $list_cell_savers = $cell_saver->loadMatchingList("marque, modele"); if (count($list_cell_savers) == 0) { $list_cell_savers[] = null; } $data['cell_saver_id'] = array('options' => array('title' => utf8_encode('Cell saver')), 'data' => array()); $series =& $data['cell_saver_id']['series']; // array_values() to have contiguous keys foreach (array_values($list_cell_savers) as $key => $_cell_saver) { if ($_cell_saver && $_cell_saver->_id) { $where[] = "blood_salvage.cell_saver_id = {$_cell_saver->_id}"; } else { $where[] = "blood_salvage.cell_saver_id IS NULL || blood_salvage.cell_saver_id = ''"; } $series[$key] = array('data' => array(), 'label' => $_cell_saver ? utf8_encode($_cell_saver) : CAppUI::tr("Unknown")); fillData($where, $ljoin, $series[$key], $dates); } if ($mode === "comparison") { $data_left = $data[$comparison_left]; $data_right = $comparison_left == $comparison_right ? array("series" => array()) : $data[$comparison_right]; $title = $data_left["options"]["title"] . " / " . $data_right["options"]["title"]; foreach ($data_right["series"] as &$_serie) { $_serie["yaxis"] = 2; $_serie["lines"] = array("show" => true); $_serie["mouse"] = array("track" => true); $_serie["bars"] = array("show" => false); } $data = array("comp" => array("series" => array_merge($data_left["series"], $data_right["series"]), "options" => $data_left["options"])); } // Ticks $i = 0;
break; case 1: error_log(date("r") . " Fill Data Phase 1 - Starting\n", 3, "installer/log.txt"); fillData(); error_log(date("r") . " Fill Data Phase 1 - Done\n", 3, "installer/log.txt"); if (!isset($error) || !isset($_SESSION['error'])) { $_SESSION['INSTALLING'] = 2; error_log(date("r") . " Fill Data Phase 1 - No Errors\n", 3, "installer/log.txt"); } else { error_log(date("r") . " Fill Data Phase 1 - Errors\n", 3, "installer/log.txt"); error_log(date("r") . " " . (isset($error) ? $error : $_SESSION['error']) . "\n", 3, "installer/log.txt"); } break; case 2: error_log(date("r") . " Fill Data Phase 2 - Starting\n", 3, "installer/log.txt"); fillData(2); error_log(date("r") . " Fill Data Phase 2 - Done\n", 3, "installer/log.txt"); if (!isset($error) || !isset($_SESSION['error'])) { $res = initUniqueIDs(); if ($res) { $_SESSION['INSTALLING'] = 3; error_log(date("r") . " Fill Data Phase 2 - No Errors\n", 3, "installer/log.txt"); } } else { error_log(date("r") . " Fill Data Phase 2 - Errors\n", 3, "installer/log.txt"); error_log(date("r") . " " . (isset($error) ? $error : $_SESSION['error']) . "\n", 3, "installer/log.txt"); } break; case 3: error_log(date("r") . " Create DB user - Starting\n", 3, "installer/log.txt"); createDBUser();
//fill data ?> <?php foreach ($output as $folder => $fdata) { //$fdata is an array to hold //scan through each file and read its data using buses foreach ($InterestBuses as $k => $bus) { $path = "data/" . $case . "/" . $folder . "/" . $bus . ".rlf"; if ($case == 33) { $upperlimit = $case + 4; } else { $upperlimit = $case + ($dg == "PV" ? 3 : 4); //wind 14 has a small glitch: an element in the middle of the list } $fdata[$bus] = fillData($path, 2, $upperlimit); // replace 6.rlf with file full ref } //scan through files $output[$folder] = $fdata; } // scan through folders //var_dump($output); ?> <?php //create tables function display() { global $InterestBuses; global $folders;