source: trunk/prototype/api/parseTPL.php @ 5399

Revision 5399, 272 bytes checked in by cristiano, 12 years ago (diff)

Ticket #2434 - Alteração da estrutura de diretórios da nova API

Line 
1<?php
2
3class ParseTPL
4{
5       
6        static function load_tpl(&$data, $file){
7      $tpl = '' ;
8        if( $fd = @fopen($file,"r")){
9                while( !feof($fd) ){
10                        $tpl = fread($fd,1024);
11                }
12        }
13        foreach($data as $i => $v){
14                $tpl = str_replace('['.$i.']',$v,$tpl);}
15       
16        return $tpl;
17        }       
18}
19
20?>
Note: See TracBrowser for help on using the repository browser.