ets.sourceforge.net Open in urlscan Pro
2606:4700::6812:c95  Public Scan

Submitted URL: http://ets.sourceforge.net/
Effective URL: https://ets.sourceforge.net/
Submission: On November 15 via api from US — Scanned from DE

Form analysis 1 forms found in the DOM

POST http://www.hotscripts.com/cgi-bin/rate.cgi

<form action="http://www.hotscripts.com/cgi-bin/rate.cgi" method="POST">
  <input type="hidden" name="ID" value="19064">
  <div><b>Rate ETS at <a href="http://www.hotscripts.com/Detailed/19064.html">HotScripts.com</a></b></div>
  <div>
    <select name="ex_rate" size="1">
      <option value="" selected="">-- Select One --</option>
      <option value="5">Excellent!</option>
      <option value="4">Very Good</option>
      <option value="3">Good</option>
      <option value="2">Fair</option>
      <option value="1">Poor</option>
    </select>
  </div>
  <div><input type="submit" value="Cast my vote"></div>
</form>

Text Content

 EASY TEMPLATE SYSTEM

--------------------------------------------------------------------------------

Current release: 3.06a
Date: May-26-2004
Contact: franck dot marcia at gmail dot com
License: LGPL
Copyright © 2002-2006 Franck Marcia



--------------------------------------------------------------------------------

Rate ETS at HotScripts.com
-- Select One -- Excellent! Very Good Good Fair Poor


Member of prev next random list join the ring







ETS is a template system written with PHP that enables you to transform a set of
data to any type of document.
For example, ETS can transform a list of product descriptions retrieved from a
database to a HTML page. It can also construct SQL statements, ASCII data, XML
documents...
ETS provides 4 functions to match a set of data with templates:
• sprintt which returns the built template as a string,
• printt which prints it out.
• sprintts and printts which use a string instead of a file name.
ETS supplies:
• array management,
• various conditional elements,
• access to any level in the data tree from any level in the template,
• data formatting,
• size reducing,
• integrated debug messages.
ETS works with 2 elements: the data tree and templates. The data tree contains
every data that will be available. Templates define the way the data tree will
be presented. You can compare it to a XML document transformed with a XSLT
template: it’s exactly the same concept.
ETS can manage recursive templates, allows a complete reshuffle of the template
with exactly the same data tree, is extremely valuable when working with
database because of the implicit use of templates...
... It’s a powerful tool that will help you efficiently to build documents.
See complete documentation with tutorial (PDF, 219 Ko)
Download the lastest release with tutorial and documentation at SourceForge.net


EXAMPLE

Template file

{mask:main}
    <h1>Simple list</h1>
    <table>
        {mask:row}
            <tr bgcolor="{const:color}"><td>{const:color} for {id}</td></tr>
            {set:_last}
                <tr><td>{_rank} element{if: {_rank} > 1}s{/} in list</td></tr>
            {/}
        {/}
    </table>
{/}

{mask:color}{set:_odd}red{/}{set:_even}blue{/}{/}


PHP code

<?php
include 'ets.php';

function getrows()
{
  for ($i = 0; $i < 10; ++$i) {
    $data[$i]->id = $i;
  }
  return $data;
}

$page->row = getrows();
printt($page, 'test.tpl');
?>


Output


Simple list



red for 0
blue for 1
red for 2
blue for 3
red for 4
blue for 5
red for 6
blue for 7
red for 8
blue for 9
10 elements in list