<?
# NRSTP - Nille's Real Simple Template Parser
# Copyright 2006 @ Nille
# Tvgnvg@hotmail.com
error_reporting(0);
class parser {
  var $versie = "1.0";
  var $templatecontent;
  var $templatefile;
  
  function parser($file) {
     $this->templatefile = $file;
     $this->templatecontent = file_get_contents($this->templatefile)or die("Fout: \"$this->templatefile\" kon niet geopend worden!");
  }
  function assign($block, $content) {
     $block = '[' . $block . ']';
     $this->templatecontent = str_replace($block, $content, $this->templatecontent);
  } 
  function output() {
     echo $this->templatecontent;
  }
}
?> 