1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17:
<? function template ($dir, $tmpl_name, $tmpl_content) { global $work; $pfad = "".$dir."\\".$tmpl_name.""; $fp = fopen($pfad, "r"); $tmpl = file_get_contents($pfad); fclose($fp); if ( trim($tmpl) <> "" ) { $work = $tmpl; while ( list( $key, $val ) = each( $tmpl_content ) ) { $x = "%%" . strtolower($key) . "%%"; $work = str_replace( $x, $val, $work ); } } return $work; } ?>