From 162879454ad49e6b58835d01b60680601765c5d0 Mon Sep 17 00:00:00 2001 From: losinshi Date: Wed, 16 Aug 2006 08:58:06 +0000 Subject: [PATCH] Working on Frontend git-svn-id: file:///home/jan/tmp/wetterstation/trunk@23 dd492736-c11a-0410-ad51-8c26713eaf7f --- webstuff/frontend/php_inc/module.inc.php | 11 +++++++++++ webstuff/frontend/php_inc/module_set.inc.php | 10 +++++----- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/webstuff/frontend/php_inc/module.inc.php b/webstuff/frontend/php_inc/module.inc.php index 2d0acb3..ea5c8f9 100644 --- a/webstuff/frontend/php_inc/module.inc.php +++ b/webstuff/frontend/php_inc/module.inc.php @@ -1,11 +1,22 @@ parseContent($this->_getModuleFilename($modName)); + } + function _getModuleFilename($modName){ + return "/content/modules/mod_".$modName.".html"; + } + + function fill($contentId){ + $content_split = explode("_", $contentId); + return $this->"get".$content_split[0]($content_split[1]) } } diff --git a/webstuff/frontend/php_inc/module_set.inc.php b/webstuff/frontend/php_inc/module_set.inc.php index 9b620e5..f0ae15a 100644 --- a/webstuff/frontend/php_inc/module_set.inc.php +++ b/webstuff/frontend/php_inc/module_set.inc.php @@ -10,24 +10,24 @@ class ModuleSet{ /* Konstruktor */ function ModuleSet($setName){ - $parser = $this->getParserInstance(); /* Parserinstanz holen */ - $parser->parseContent($this->getSetFilename($setName), $this, NULL); /* Set Parsen */ + $parser = $this->_getParserInstance(); /* Parserinstanz holen */ + $parser->parseContent($this->_getSetFilename($setName), $this, NULL); /* Set Parsen */ } /* Dateinamen eines Setz aus dessen Namen zusammenbauen */ - function getSetFilename($setName){ + function _getSetFilename($setName){ return "content/module_sets/set_".$setName.".html"; } /* Parser Instanzieren (wenn noch nicht ist) und zurückgeben */ - function getParserInstance(){ + function _getParserInstance(){ if($this->parserInstance==NULL) $parserInstance = new Parser(); return $parserInstance; } /* Ein Modul hinzufügen */ - function addModule($modName){ + function _addModule($modName){ $params = explode("_",$modName); /* Modulname und Sensorid trennen */ include("content/modules/mod_".$params[0].".html"); }