1
0
mirror of https://github.com/agdsn/ancient-weatherstation.git synced 2026-06-19 23:07:59 +00:00

charts added to webfrontend

git-svn-id: file:///home/jan/tmp/wetterstation/trunk@114 dd492736-c11a-0410-ad51-8c26713eaf7f
This commit is contained in:
losinshi
2006-09-18 17:58:25 +00:00
parent cac1a73c77
commit 504ee3b339
8 changed files with 211 additions and 2 deletions
@@ -3,6 +3,7 @@ include_once("php_inc/module.inc.php");
include_once("php_inc/parser.inc.php");
include_once("php_inc/connection.inc.php");
include_once("php_inc/config.inc.php");
include_once("php_inc/chart.inc.php");
/* Klasse, die die ModuleSets Verwaltet */
@@ -15,6 +16,10 @@ class ModuleSet{
$parser = & $this->_getParserInstance(); /* Parserinstanz holen */
$parser->parseContent($this->_getSetFilename($setName), &$this, NULL); /* Set Parsen */
if($_REQUEST['chartName'] != ""){
$parser->appendContent($this->getBackLink());
}
$parser->printContent();
if ($this->connInstance != NULL){
@@ -48,5 +53,21 @@ class ModuleSet{
$params = explode("_",$modName); /* Modulname und Sensorid trennen */
new Module($params[0], $params[1], $this->_getParserInstance(), $this->_getConnInstance());
}
function addChart($template){
new Chart($template, $this->_getParserInstance());
}
function getBackLink(){
$buff = '<div class="back_link_div">';
$buff .= '<a class="back_link" href="';
$buff .= $_SERVER['HTTP_REFERER'];
$buff .= '">';
$buff .= 'zur&uuml;ck';
$buff .= "</a>";
$buff .= "</div>";
return $buff;
}
}
?>