TemTab.php : test template

Introduction

This is a test template that shows the use of the TemTab class, see the class.TemTab.php file for its definition. Examples are quite basics. Here is the PHP source code of the script generating this page and the HTML template file of this page.

License

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

v1.0 Copyright 2002 Antoine Delvaux, Cassiopea.


The tests

First, let's define some variables and try to replace them. BTW, what time is it ?

Just variables

It is ~!time~.

Variable number two you asked ? Here it is enclosed with quotes: '~!var-2~' !

Loops

Then let's try to do a loop to be filled with an array of vars.

  1st values 2nd values 3rd values 4th values
~!loop1-var-0~ ~!loop1-var-1~ ~!loop1-var-2~ ~!loop1-var-3~ ~!loop1-var-4~

Then let's try to do a loop with the use of custom variable names.

  Firstname Team Points
~!loop2-column~ ~!loop2-firstname~ ~!loop2-team~ ~!loop2-points~

Want again the first table values but in a different output ? Here it is in list format ! And all with a single statement.~!unused~

  1. ~!loop1-var-0~

Loop inside loop

~!loop-test-status~
  1. ~!loop3-game~

    Bonus : ~!loop3-bonus~

      Firstname Team Points
    ~!loop2-new-column~ ~!loop2-new-firstname~ ~!loop2-new-team~ ~!loop2-new-points~

Notes

The unused variables of the template have been deleted. See the HTML source code for a comment on how many of them have been replaced.

See also the source code for a comment about the time it took the server to process this page.


That's it for the test.


You really want variable two once again ?

~!var-2~