]> git.llucax.com Git - software/bife/hit.git/blob - examples/index.php
0e6aa250e4b92147e3194db3b11c455732b72502
[software/bife/hit.git] / examples / index.php
1 <?
2 // vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4:
3 // +--------------------------------------------------------------------+
4 // |                       BIFE - Buil It FastEr                        |
5 // +--------------------------------------------------------------------+
6 // | This file is part of BIFE.                                         |
7 // |                                                                    |
8 // | BIFE is free software; you can redistribute it and/or modify it    |
9 // | under the terms of the GNU General Public License as published by  |
10 // | the Free Software Foundation; either version 2 of the License, or  |
11 // | (at your option) any later version.                                |
12 // |                                                                    |
13 // | BIFE is distributed in the hope that it will be useful, but        |
14 // | WITHOUT ANY WARRANTY; without even the implied warranty of         |
15 // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU   |
16 // | General Public License for more details.                           |
17 // |                                                                    |
18 // | You should have received a copy of the GNU General Public License  |
19 // | along with Hooks; if not, write to the Free Software Foundation,   |
20 // | Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA      |
21 // +--------------------------------------------------------------------+
22 // | Created: miĆ© jun 18 01:05:57 ART 2003                              |
23 // | Authors: Leandro Lucarella <luca@lugmen.org.ar>                    |
24 // +--------------------------------------------------------------------+
25 //
26 // $Id$
27 //
28
29 // This is a simple test and example of HTML_Template_HIT
30
31 ini_set('include_path', '../src:'.ini_get('include_path'));
32 umask('002');
33
34 require_once 'HTML/Template/HIT.php';
35
36 $hit =& new HTML_Template_HIT('hooks');
37
38 for ($i = 0; $i < 20; $i++) {
39     for ($j = 0; $j < 20; $j++) {
40         $hit->parseBuffered('cell', 'CELL', "$i,$j");
41     }
42     $hit->parseBuffered('row', 'ROW', $hit->popBuffer('cell'));
43 }
44 echo $hit->parse(
45     'body',
46     array(
47         'ROWS' => $hit->popBuffer('row'),
48         'TITLE' => 'HOLA MUNDO!!!',
49     )
50 );
51
52 ?>