Exemplo n.º 1
0
        if (!is_array($select_program)) {
            $select_program = explode(",", $select_program);
        }
    } else {
        $select_program = array();
    }
} else {
    $select_program = explode(",", $select_program);
}
// If there is a second regul add tooltip
$resume_regul = array();
if ($second_regul == "True") {
    // Create an array with all plug
    $resume_regul[0] = "<p align='center'><b><i>" . __('SUMARY_REGUL_TITLE') . "</i></b></p><br />";
    for ($i = 1; $i <= $nb_plugs; $i++) {
        $resume_regul[$i] = format_regul_sumary($i, $main_error);
    }
    $plugsShow = array();
    foreach ($select_power as $sel_power) {
        $plugsShow[] = $sel_power;
    }
    foreach ($select_program as $sel_program) {
        $plugsShow[] = $sel_program;
    }
    // Remove doublon and sort
    $plugsShow = array_unique($plugsShow);
    asort($plugsShow);
}
if ($type == "month") {
    $legend_date = $startyear . "-" . $startmonth;
    $xlegend = "XAXIS_LEGEND_MONTH";
Exemplo n.º 2
0
    $program_index_id = 1;
}
// Get "number" field of program table
$program_index = programs\get_field_from_program_index("program_idx", $program_index_id);
// Get number of daily program recorded:
$nb_daily_program = get_nb_daily_program($main_error);
$error_value[0] = "";
$error_value[1] = "";
$error_value[2] = __('ERROR_VALUE_PROGRAM', 'html');
$error_value[3] = __('ERROR_VALUE_PROGRAM_TEMP', 'html');
$error_value[4] = __('ERROR_VALUE_PROGRAM_HUMI', 'html');
$error_value[5] = __('ERROR_VALUE_PROGRAM_CM', 'html');
$error_value[6] = __('ERROR_VALUE_PROGRAM', 'html');
$error_value[7] = __('ERROR_VALUE_PURCENT', 'html');
for ($i = 1; $i <= $nb_plugs; $i++) {
    $resume_regul[$i] = format_regul_sumary("{$i}", $main_error);
}
if (isset($cyclic) && !empty($cyclic)) {
    //Dans le cas d'un programme cyclique on récupère les champs correspondant:
    if (!isset($repeat_time)) {
        $repeat_time = getvar("repeat_time");
        //La fréquence de répétition
    }
    if (!isset($start_time_cyclic)) {
        $start_time_cyclic = getvar('start_time_cyclic');
        //L'heure de départ du programme
    }
    if (!isset($end_time_cyclic)) {
        $end_time_cyclic = getvar('end_time_cyclic');
        //L'heure de fin du programme
    }