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

Frontend:

a summary-view added
bugfixes


git-svn-id: file:///home/jan/tmp/wetterstation/trunk@117 dd492736-c11a-0410-ad51-8c26713eaf7f
This commit is contained in:
losinshi
2006-09-20 13:20:00 +00:00
parent 04e4bcd3a4
commit 21f15f6c54
13 changed files with 307 additions and 31 deletions
+9 -2
View File
@@ -15,9 +15,11 @@ class Parser{
if(is_array($newContent)){
for($i = 0; $i < count($newContent); $i++){
array_push($this->contentArray, $newContent[$i]);
//echo $newContent[$i]."\n";
}
} else {
array_push($this->contentArray, $newContent);
//echo $newContent."\n";
}
}
@@ -31,7 +33,7 @@ class Parser{
/* File Parsen */
function parseContent($fileName, & $callingObject, $filePart=null){
function parseContent($fileName, & $callingObject, $filePart=null, $lineWise = false){
$fileArray = file($fileName); /* File als Array einlesen */
if($filePart != null){
$fileArray = $this->_fetchFilePart(&$fileArray, $filePart); /* Wenn File aus mehreren Template-Teilen besteht, dann wird hir der relevante Zeil geholt */
@@ -44,8 +46,13 @@ class Parser{
$fileArray[$i] = preg_replace("/\{content:".$results[1][$j].":".$results[2][$j]."\}/i", $insert, $fileArray[$i]);
}
}
if ($lineWise){
$this->appendContent($fileArray[$i]);
}
}
if (!$lineWise){
$this->appendContent($fileArray);
}
$this->appendContent($fileArray);
}