Location: PHPKode > projects > Easy Music Box > lib/class.template.inc
<?php
/*
 * @package    Easy MusicBox
 * @author     Kevin Pentiah <hide@address.com>
 * @copyright  2006 3scriptz
 * @license    PHP License 
 * @version    Release: 1.0.0
 * @link       http://www.3scriptz.com
 * @since      Class available since Release 1.0.0
 * @desc	template of page
 */

//template
class tpl {
	var $page;
	var $contents;
	var $tag;
	
	function tpl($template) {
	  $this->page = join("", file($template));
	}

	function get_content($tags = array()) {
	  foreach ($tags as $tag => $file) {
			ob_start();
			include($file);
			$this->contents = ob_get_contents();
			ob_end_clean();
			$this->page = eregi_replace("{" . $tag . "}", $this->contents, $this->page);
		}
		echo $this->page;
	}
}
?>
Return current item: Easy Music Box