xml output added
git-svn-id: file:///home/jan/tmp/wetterstation/trunk@233 dd492736-c11a-0410-ad51-8c26713eaf7f
This commit is contained in:
parent
3e39cafa52
commit
470f2cf92c
|
|
@ -0,0 +1,16 @@
|
||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
|
<Module id="1">
|
||||||
|
{content:addModule:xmltemp_1}
|
||||||
|
{content:addModule:xmlhum_1}
|
||||||
|
{content:addModule:xmlpress_1}
|
||||||
|
</Module>
|
||||||
|
<Module id="1">
|
||||||
|
{content:addModule:xmltemp_4}
|
||||||
|
{content:addModule:xmlhum_4}
|
||||||
|
</Module>
|
||||||
|
<Module id="1">
|
||||||
|
{content:addModule:xmlwind_2}
|
||||||
|
</Module>
|
||||||
|
<Module id="1">
|
||||||
|
{content:addModule:xmlrain_3}
|
||||||
|
</Module>
|
||||||
|
|
@ -0,0 +1,45 @@
|
||||||
|
<Humidity>
|
||||||
|
<SensorId>{content:fill:sens_id}</SensorId>
|
||||||
|
<Location>{content:fill:sens_location}</Location>
|
||||||
|
<Description>{content:fill:sens_description}</Description>
|
||||||
|
<Now>
|
||||||
|
<Value>{content:fill:hum_now_val}</Value>
|
||||||
|
<Date>{content:fill:hum_now_date}</Date>
|
||||||
|
</Now>
|
||||||
|
<Average>
|
||||||
|
<Value>{content:fill:hum_av_value}</Value>
|
||||||
|
<Interval>{content:fill:hum_av_interval}</Interval>
|
||||||
|
</Average>
|
||||||
|
<Changing>
|
||||||
|
<Value>{content:fill:hum_changing}</Value>
|
||||||
|
</Changing>
|
||||||
|
<BoundMin>
|
||||||
|
<Value>{content:fill:hum_max_val}</Value>
|
||||||
|
<Date>{content:fill:hum_max_date}</Date>
|
||||||
|
</BoundMin>
|
||||||
|
<BoundMax>
|
||||||
|
<Value>{content:fill:hum_min_val}</Value>
|
||||||
|
<Date>{content:fill:hum_min_date}</Date>
|
||||||
|
</BoundMax>
|
||||||
|
<Charts>
|
||||||
|
<Chart>
|
||||||
|
<Type>hum</Type>
|
||||||
|
<Description>Luftfeuchtediagramm Sensor {content:fill:sens_id} - 30 Tage</Description>
|
||||||
|
<Interval>10</Interval>
|
||||||
|
<Link>{content:addChartImgLink:hum_10}</Link>
|
||||||
|
</Chart>
|
||||||
|
<Chart>
|
||||||
|
<Type>hum</Type>
|
||||||
|
<Description>Luftfeuchtediagramm Sensor {content:fill:sens_id} - 30 Tage</Description>
|
||||||
|
<Interval>30</Interval>
|
||||||
|
<Link>{content:addChartImgLink:hum_30}</Link>
|
||||||
|
</Chart>
|
||||||
|
<Chart>
|
||||||
|
<Type>hum</Type>
|
||||||
|
<Description>Luftfeuchtediagramm Sensor {content:fill:sens_id} - 365 Tage</Description>
|
||||||
|
<Interval>365</Interval>
|
||||||
|
<Link>{content:addChartImgLink:hum_365}</Link>
|
||||||
|
</Chart>
|
||||||
|
</Charts>
|
||||||
|
</Humidity>
|
||||||
|
|
||||||
|
|
@ -0,0 +1,46 @@
|
||||||
|
<Pressure>
|
||||||
|
<SensorId>{content:fill:sens_id}</SensorId>
|
||||||
|
<Location>{content:fill:sens_location}</Location>
|
||||||
|
<Description>{content:fill:sens_description}</Description>
|
||||||
|
<Now>
|
||||||
|
<Value>{content:fill:press_now_val}</Value>
|
||||||
|
<Date>{content:fill:press_now_date}</Date>
|
||||||
|
</Now>
|
||||||
|
<Average>
|
||||||
|
<Value>{content:fill:press_av_value}</Value>
|
||||||
|
<Interval>{content:fill:press_av_interval}</Interval>
|
||||||
|
</Average>
|
||||||
|
<Changing>
|
||||||
|
<Value>{content:fill:press_changing}</Value>
|
||||||
|
</Changing>
|
||||||
|
<BoundMin>
|
||||||
|
<Value>{content:fill:press_max_val}</Value>
|
||||||
|
<Date>{content:fill:press_max_date}</Date>
|
||||||
|
</BoundMin>
|
||||||
|
<BoundMax>
|
||||||
|
<Value>{content:fill:press_min_val}</Value>
|
||||||
|
<Date>{content:fill:press_min_date}</Date>
|
||||||
|
</BoundMax>
|
||||||
|
<Charts>
|
||||||
|
<Chart>
|
||||||
|
<Type>press</Type>
|
||||||
|
<Description>Luftdruckdiagramm Sensor {content:fill:sens_id} - 30 Tage</Description>
|
||||||
|
<Interval>10</Interval>
|
||||||
|
<Link>{content:addChartImgLink:press_10}</Link>
|
||||||
|
</Chart>
|
||||||
|
<Chart>
|
||||||
|
<Type>press</Type>
|
||||||
|
<Description>Luftdruckdiagramm Sensor {content:fill:sens_id} - 30 Tage</Description>
|
||||||
|
<Interval>30</Interval>
|
||||||
|
<Link>{content:addChartImgLink:press_30}</Link>
|
||||||
|
</Chart>
|
||||||
|
<Chart>
|
||||||
|
<Type>press</Type>
|
||||||
|
<Description>Luftdruckdiagramm Sensor {content:fill:sens_id} - 365 Tage</Description>
|
||||||
|
<Interval>365</Interval>
|
||||||
|
<Link>{content:addChartImgLink:press_365}</Link>
|
||||||
|
</Chart>
|
||||||
|
</Charts>
|
||||||
|
</Pressure>
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,43 @@
|
||||||
|
<Rain>
|
||||||
|
<SensorId>{content:fill:sens_id}</SensorId>
|
||||||
|
<Location>{content:fill:sens_location}</Location>
|
||||||
|
<Description>{content:fill:sens_description}</Description>
|
||||||
|
<Value interval="hour">{content:fill:rain_now_hour}</Value>
|
||||||
|
<Value interval="day">{content:fill:rain_now_day}</Value>
|
||||||
|
<Value interval="month">{content:fill:rain_now_month}</Value>
|
||||||
|
|
||||||
|
<Max interval="hour">
|
||||||
|
<Date>{content:fill:rain_max_hour_date}</Date>
|
||||||
|
<Value>{content:fill:rain_max_hour_val}</Value>
|
||||||
|
</Max>
|
||||||
|
<Max interval="day">
|
||||||
|
<Date>{content:fill:rain_max_day_date}</Date>
|
||||||
|
<Value>{content:fill:rain_max_day_val}</Value>
|
||||||
|
</Max>
|
||||||
|
<Max interval="month">
|
||||||
|
<Date>{content:fill:rain_max_month_date}</Date>
|
||||||
|
<Value>{content:fill:rain_max_month_val}</Value>
|
||||||
|
</Max>
|
||||||
|
|
||||||
|
<Charts>
|
||||||
|
<Chart>
|
||||||
|
<Type>rain</Type>
|
||||||
|
<Description>Regendiagramm Sensor {content:fill:sens_id} - 30 Tage</Description>
|
||||||
|
<Interval>10</Interval>
|
||||||
|
<Link>{content:addChartImgLink:rain_10}</Link>
|
||||||
|
</Chart>
|
||||||
|
<Chart>
|
||||||
|
<Type>rain</Type>
|
||||||
|
<Description>Regendiagramm Sensor {content:fill:sens_id} - 30 Tage</Description>
|
||||||
|
<Interval>30</Interval>
|
||||||
|
<Link>{content:addChartImgLink:rain_30}</Link>
|
||||||
|
</Chart>
|
||||||
|
<Chart>
|
||||||
|
<Type>rain</Type>
|
||||||
|
<Description>Regendiagramm Sensor {content:fill:sens_id} - 365 Tage</Description>
|
||||||
|
<Interval>365</Interval>
|
||||||
|
<Link>{content:addChartImgLink:rain_365}</Link>
|
||||||
|
</Chart>
|
||||||
|
</Charts>
|
||||||
|
</Rain>
|
||||||
|
|
||||||
|
|
@ -0,0 +1,45 @@
|
||||||
|
<Temperature>
|
||||||
|
<SensorId>{content:fill:sens_id}</SensorId>
|
||||||
|
<Location>{content:fill:sens_location}</Location>
|
||||||
|
<Description>{content:fill:sens_description}</Description>
|
||||||
|
<Now>
|
||||||
|
<Value>{content:fill:temp_now_val}</Value>
|
||||||
|
<Date>{content:fill:temp_now_date}</Date>
|
||||||
|
</Now>
|
||||||
|
<Average>
|
||||||
|
<Value>{content:fill:temp_av_value}</Value>
|
||||||
|
<Interval>{content:fill:temp_av_interval}</Interval>
|
||||||
|
</Average>
|
||||||
|
<Changing>
|
||||||
|
<Value>{content:fill:temp_changing}</Value>
|
||||||
|
</Changing>
|
||||||
|
<BoundMin>
|
||||||
|
<Value>{content:fill:temp_max_val}</Value>
|
||||||
|
<Date>{content:fill:temp_max_date}</Date>
|
||||||
|
</BoundMin>
|
||||||
|
<BoundMax>
|
||||||
|
<Value>{content:fill:temp_min_val}</Value>
|
||||||
|
<Date>{content:fill:temp_min_date}</Date>
|
||||||
|
</BoundMax>
|
||||||
|
<Charts>
|
||||||
|
<Chart>
|
||||||
|
<Type>temp</Type>
|
||||||
|
<Description>Temparaturdiagramm Sensor {content:fill:sens_id} - 30 Tage</Description>
|
||||||
|
<Interval>10</Interval>
|
||||||
|
<Link>{content:addChartImgLink:temp_10}</Link>
|
||||||
|
</Chart>
|
||||||
|
<Chart>
|
||||||
|
<Type>temp</Type>
|
||||||
|
<Description>Temparaturdiagramm Sensor {content:fill:sens_id} - 30 Tage</Description>
|
||||||
|
<Interval>30</Interval>
|
||||||
|
<Link>{content:addChartImgLink:temp_30}</Link>
|
||||||
|
</Chart>
|
||||||
|
<Chart>
|
||||||
|
<Type>temp</Type>
|
||||||
|
<Description>Temparaturdiagramm Sensor {content:fill:sens_id} - 365 Tage</Description>
|
||||||
|
<Interval>365</Interval>
|
||||||
|
<Link>{content:addChartImgLink:temp_365}</Link>
|
||||||
|
</Chart>
|
||||||
|
</Charts>
|
||||||
|
</Temperature>
|
||||||
|
|
||||||
|
|
@ -0,0 +1,42 @@
|
||||||
|
<Wind>
|
||||||
|
<SensorId>{content:fill:sens_id}</SensorId>
|
||||||
|
<Location>{content:fill:sens_location}</Location>
|
||||||
|
<Description>{content:fill:sens_description}</Description>
|
||||||
|
<Now>
|
||||||
|
<Value>{content:fill:wind_now_val}</Value>
|
||||||
|
<Date>{content:fill:wind_now_date}</Date>
|
||||||
|
</Now>
|
||||||
|
<Average>
|
||||||
|
<Value>{content:fill:wind_av_value}</Value>
|
||||||
|
<Interval>{content:fill:wind_av_interval}</Interval>
|
||||||
|
</Average>
|
||||||
|
<Changing>
|
||||||
|
<Value>{content:fill:wind_changing}</Value>
|
||||||
|
</Changing>
|
||||||
|
<BoundMax>
|
||||||
|
<Value>{content:fill:wind_max_val}</Value>
|
||||||
|
<Date>{content:fill:wind_max_date}</Date>
|
||||||
|
</BoundMax>
|
||||||
|
<Charts>
|
||||||
|
<Chart>
|
||||||
|
<Type>wind</Type>
|
||||||
|
<Description>Winddiagramm Sensor {content:fill:sens_id} - 30 Tage</Description>
|
||||||
|
<Interval>10</Interval>
|
||||||
|
<Link>{content:addChartImgLink:wind_10}</Link>
|
||||||
|
</Chart>
|
||||||
|
<Chart>
|
||||||
|
<Type>wind</Type>
|
||||||
|
<Description>Winddiagramm Sensor {content:fill:sens_id} - 30 Tage</Description>
|
||||||
|
<Interval>30</Interval>
|
||||||
|
<Link>{content:addChartImgLink:wind_30}</Link>
|
||||||
|
</Chart>
|
||||||
|
<Chart>
|
||||||
|
<Type>wind</Type>
|
||||||
|
<Description>Winddiagramm Sensor {content:fill:sens_id} - 365 Tage</Description>
|
||||||
|
<Interval>365</Interval>
|
||||||
|
<Link>{content:addChartImgLink:wind_365}</Link>
|
||||||
|
</Chart>
|
||||||
|
</Charts>
|
||||||
|
</Wind>
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -80,4 +80,7 @@ $report = array(
|
||||||
'hum_365_4' =>array( "Daten - Report", "Listet Stündliche Luftfeuchtigkeits - Werte der Letzten 10 Tage", 4, "hum", "day", "1 years", "Luftfeuchtigkeit", 1, "%", "hum", true, "DD.MM.YYYY ", "report")
|
'hum_365_4' =>array( "Daten - Report", "Listet Stündliche Luftfeuchtigkeits - Werte der Letzten 10 Tage", 4, "hum", "day", "1 years", "Luftfeuchtigkeit", 1, "%", "hum", true, "DD.MM.YYYY ", "report")
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/* Nicht-Standard-Sets */
|
||||||
|
$notStandard = array("xml_full");
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,8 @@
|
||||||
|
|
||||||
$path = "./";
|
$path = "./";
|
||||||
include_once($path."php_inc/module_set.inc.php");
|
include_once($path."php_inc/module_set.inc.php");
|
||||||
|
|
||||||
|
if (ModuleSet::isStandardPage($_REQUEST['setType'])) {
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
<html>
|
<html>
|
||||||
|
|
@ -17,8 +19,14 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1><? echo Config::getAllTitle(); ?></h1>
|
<h1><? echo Config::getAllTitle(); ?></h1>
|
||||||
<? new ModuleSet($_REQUEST['setType']);?>
|
<?
|
||||||
|
}
|
||||||
|
new ModuleSet($_REQUEST['setType']);
|
||||||
|
if (ModuleSet::isStandardPage($_REQUEST['setType'])) {
|
||||||
|
?>
|
||||||
<p id="copyright">(c) 2006 by Jan Losinski</p>
|
<p id="copyright">(c) 2006 by Jan Losinski</p>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
|
||||||
|
|
@ -72,6 +72,15 @@ class Chart{
|
||||||
return Chart::_getChartImgTag($chartName);
|
return Chart::_getChartImgTag($chartName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function insertChartLink($chartName){
|
||||||
|
if($chartName == "auto"){
|
||||||
|
$chartName = $_REQUEST['chartName'];
|
||||||
|
}
|
||||||
|
$chartArray = Config::getChartArray($chartName);
|
||||||
|
|
||||||
|
return Chart::_getChartImgLink($chartArray[0]);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
|
|
@ -53,5 +53,10 @@ class Config{
|
||||||
global $average_interval;
|
global $average_interval;
|
||||||
return $average_interval;
|
return $average_interval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getNotStandardPages(){
|
||||||
|
global $notStandard;
|
||||||
|
return $notStandard;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
|
|
@ -42,9 +42,11 @@ class Module{
|
||||||
$this->parserInstance = &$parser;
|
$this->parserInstance = &$parser;
|
||||||
$this->table = $this->_getTableName();
|
$this->table = $this->_getTableName();
|
||||||
|
|
||||||
$parser->parseContent($this->_getModuleFilename("frame"), & $this, "top"); /* Oberen Modulrahmen parsen */
|
if (ModuleSet::isStandardPage($_REQUEST['setType']))
|
||||||
|
$parser->parseContent($this->_getModuleFilename("frame"), & $this, "top"); /* Oberen Modulrahmen parsen */
|
||||||
$parser->parseContent($this->_getModuleFilename($modName), & $this, NULL); /* Modul Parsen */
|
$parser->parseContent($this->_getModuleFilename($modName), & $this, NULL); /* Modul Parsen */
|
||||||
$parser->parseContent($this->_getModuleFilename("frame"), & $this, "bottom"); /* unteren Modulrahmen Parsen */
|
if (ModuleSet::isStandardPage($_REQUEST['setType']))
|
||||||
|
$parser->parseContent($this->_getModuleFilename("frame"), & $this, "bottom"); /* unteren Modulrahmen Parsen */
|
||||||
}
|
}
|
||||||
|
|
||||||
function _getTableName(){
|
function _getTableName(){
|
||||||
|
|
@ -126,7 +128,11 @@ class Module{
|
||||||
}
|
}
|
||||||
|
|
||||||
function addChart($chartName){
|
function addChart($chartName){
|
||||||
Chart::insertChart($chartName);
|
return Chart::insertChart($chartName);
|
||||||
|
}
|
||||||
|
|
||||||
|
function addChartImgLink($chartName){
|
||||||
|
return Chart::insertChartLink($chartName.'_'.$this->sensId);
|
||||||
}
|
}
|
||||||
|
|
||||||
function addSetLink($setName){
|
function addSetLink($setName){
|
||||||
|
|
|
||||||
|
|
@ -109,5 +109,9 @@ class ModuleSet{
|
||||||
|
|
||||||
return $buff;
|
return $buff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function isStandardPage($set_type){
|
||||||
|
return !in_array($set_type, Config::getNotStandardPages());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue