debbuging presence
This commit is contained in:
@ -29,25 +29,30 @@ if (empty($indexIeeeAddress))
|
||||
{
|
||||
if ( array_key_exists($value["device"], $indexIeeeAddress))
|
||||
{
|
||||
$devicesList[$value["device"]]["fn"] = $indexIeeeAddress[$value["device"]];
|
||||
$devicesList[$value["device"]][] = $value["property"];
|
||||
$fn = $indexIeeeAddress[$value["device"]];
|
||||
$devicesList[$fn]["ieeeAddress"] = $value["device"];
|
||||
$devicesList[$fn]["properties"][] = $value["property"];
|
||||
}
|
||||
}
|
||||
ksort($devicesList, SORT_STRING );
|
||||
ksort($devicesList, SORT_NATURAL | SORT_FLAG_CASE );
|
||||
|
||||
//$devicesList = array_intersect_key($indexIeeeAddress, $tmp);
|
||||
//print_r($devicesList);
|
||||
foreach($devicesList as $ieeeAddress => $array)
|
||||
foreach($devicesList as $fn => $array)
|
||||
{
|
||||
print '<optgroup label="' . $array["fn"] . '">';
|
||||
foreach($array as $key => $property)
|
||||
print '<optgroup label="' . $fn . '">';
|
||||
$ieeeAddress = $array["ieeeAddress"];
|
||||
if (array_key_exists("properties", $array))
|
||||
{
|
||||
if ($key != "fn")
|
||||
foreach($array["properties"] as $property)
|
||||
{
|
||||
print '<option value="' . $ieeeAddress . '|' . $array["fn"] . '|' . $property . '">' . $property . '</option>' . EOL;
|
||||
print '<option value="' . $ieeeAddress . '|' . $fn . '|' . $property . '">' . $property . '</option>' . EOL;
|
||||
}
|
||||
print '</optgroup>' . EOL;
|
||||
}else
|
||||
{
|
||||
echo _("Erreur: la clé de tableau 'properties' n'existe pas ") . __LINE__ . EOLH;
|
||||
}
|
||||
print '</optgroup>' . EOL;
|
||||
}
|
||||
print "</select>" . EOLH;
|
||||
print '<input type="date" name="startDate">' . EOLH;
|
||||
|
15
webserver/intervalDate.php
Normal file
15
webserver/intervalDate.php
Normal file
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
require_once "header.php";
|
||||
require_once "config.php";
|
||||
require_once $mohaPath . "/constants.php";
|
||||
print '<form method="GET" action="display_stats.php">';
|
||||
foreach ($_GET as $key => $value)
|
||||
{
|
||||
print '<input type=hidden name=' . $key . ' value=' . $value . ">";
|
||||
}
|
||||
print '<input type="date" name="startDate">' . EOLH;
|
||||
print '<input type="date" name="endDate">' . EOLH;
|
||||
print '<input type="submit" value="Afficher les statistiques">';
|
||||
print "</form>" . EOL;
|
||||
|
||||
?>
|
Reference in New Issue
Block a user