Пример #1
0
function session($configfile)
{
    if (get_magic_quotes_runtime()) {
        set_magic_quotes_runtime(0);
    }
    $ini = readINIfile("" . $configfile . "", ";");
    // dabei ist ; das zeichen für einen kommentar. kann geändert werden.
    for ($i = 0; $i <= 7; $i++) {
        $_SESSION["color_ch" . $i] = $ini['plotter']['color_ch' . $i];
        $_SESSION["temp_min" . $i] = $ini['temp_min']['temp_min' . $i];
        $_SESSION["temp_max" . $i] = $ini['temp_max']['temp_max' . $i];
        $_SESSION["ch_name" . $i] = $ini['ch_name']['ch_name' . $i];
        $_SESSION["alert" . $i] = $ini['web_alert']['ch' . $i];
        $_SESSION["ch_show" . $i] = $ini['ch_show']['ch' . $i];
    }
    $_SESSION["plot_start"] = $ini['ToDo']['plot_start'];
    $_SESSION["plotname"] = $ini['plotter']['plotname'];
    $_SESSION["plotsize"] = $ini['plotter']['plotsize'];
    $_SESSION["plotbereich_min"] = $ini['plotter']['plotbereich_min'];
    $_SESSION["plotbereich_max"] = $ini['plotter']['plotbereich_max'];
    $_SESSION["keybox"] = $ini['plotter']['keybox'];
    $_SESSION["keyboxframe"] = $ini['plotter']['keyboxframe'];
    $_SESSION["pit_on"] = $ini['ToDo']['pit_on'];
    $_SESSION["pit_ch"] = $ini['Pitmaster']['pit_ch'];
    $_SESSION["webcam_start"] = $ini['webcam']['webcam_start'];
    $_SESSION["current_temp"] = $ini['filepath']['current_temp'];
    $_SESSION["pitmaster"] = $ini['filepath']['pitmaster'];
    if (!isset($_SESSION["websoundalert"])) {
        $_SESSION["websoundalert"] = "True";
    }
}
}
$currentlogfilename = file_get_contents($_SESSION["current_temp"]);
while (preg_match("/TEMPLOG/i", $currentlogfilename) != "1") {
    $currentlogfilename = file_get_contents($_SESSION["current_temp"]);
}
$currentlogfilename = explode(";", $currentlogfilename);
$currentlogfilename = $currentlogfilename[18];
//echo $currentlogfilename;
//-------------------------------------------------------------------------------------------------------------------------------------
// WLANThermo.conf einlesen ###########################################################################################################
//-------------------------------------------------------------------------------------------------------------------------------------
if (file_exists($inipath)) {
    if (get_magic_quotes_runtime()) {
        set_magic_quotes_runtime(0);
    }
    $ini = readINIfile($inipath, ";");
    // dabei ist ; das zeichen für einen kommentar. kann geändert werden.
} else {
    echo "<h2>Die Konfigurationsdatei (" . $inipath . ") existiert nicht!</h2>";
    die;
}
if (isset($_POST["yes"])) {
    echo "<div class=\"infofield\">";
    if ($_SESSION["plot_start"] == "True") {
        // Prüfen ob der Plotdienst eingeschaltet ist
        if (file_exists("" . $document_root . "tmp/temperaturkurve.png")) {
            //Überprüfen ob eine Plotgrafik existiert
            copy("" . $document_root . "tmp/temperaturkurve.png", "" . $document_root . "thermoplot/{$currentlogfilename}.png");
            // Plotgrafik kopieren
            echo "<h2>Aktuelle Plotgrafik wird gesichert...</h2>";
        } else {
Пример #3
0
{
    $array = @parse_ini_file(AASTRA_PATH_CACHE . $filename . '.session', true);
    if ($array == NULL) {
        $array = array();
    } else {
        if ($appli != $array['appli'] || time() > $array['exp']) {
            $array = array();
        }
    }
    return $array;
}
###################################################################
# Main code
###################################################################
# Retrieve cache location
$array_config_server = readINIfile('/etc/aastra-xml.conf', '#', '=');
if ($array_config_server['General']['cache'] != '') {
    define('AASTRA_PATH_CACHE', $array_config_server['General']['cache'] . '/');
} else {
    define('AASTRA_PATH_CACHE', '/var/cache/aastra/');
}
# New AGI
$agi = new AGI();
# Retrieve calling extension
$exten = $agi->request['agi_callerid'];
# Retrieve parameters
$array = read_session('vmail', $exten);
$action = $array['action'];
$type = $array['type'];
$user = $array['user'];
if ($type == 'message') {
Пример #4
0
<?php

//-------------------------------------------------------------------------------------------------------------------------------------
// Files einbinden ####################################################################################################################
//-------------------------------------------------------------------------------------------------------------------------------------
include "../header.php";
include "../function.php";
$dateiname = '../temperaturen.csv';
$inipath = '../conf/WLANThermo.conf';
//-------------------------------------------------------------------------------------------------------------------------------------
// WLANThermo.conf einlesen ###########################################################################################################
//-------------------------------------------------------------------------------------------------------------------------------------
if (get_magic_quotes_runtime()) {
    set_magic_quotes_runtime(0);
}
$ini = readINIfile("../conf/WLANThermo.conf", ";");
// dabei ist ; das zeichen für einen kommentar.
//-------------------------------------------------------------------------------------------------------------------------------------
// String in Array Speichern (sensoren,plotter,farben etc.) ###########################################################################
//-------------------------------------------------------------------------------------------------------------------------------------
for ($i = 0; $i <= 7; $i++) {
    $fuehler[] = $ini['Sensoren']['ch' . $i];
    $color_ch[] = $ini['plotter']['color_ch' . $i];
    $temp_min[] = $ini['temp_min']['temp_min' . $i];
    $temp_max[] = $ini['temp_max']['temp_max' . $i];
    $ch_name[] = $ini['ch_name']['ch_name' . $i];
    $ch_show[] = $ini['ch_show']['ch' . $i];
    $alert[] = $ini['web_alert']['ch' . $i];
}
$email = $ini['Email']['email_alert'];
$auth_check = $ini['Email']['auth'];