You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl-cvs@perl.apache.org by ri...@locus.apache.org on 2000/06/06 16:39:26 UTC

cvs commit: embperl/test/html/match div.htm

richter     00/06/06 07:39:25

  Modified:    .        Tag: Embperl2 TODO embpcgi.bat embpcgi.pl
                        embpcgi.test.bat embpcgi.test.pl embpexec.bat
                        embpexec.pl epdom.c epmain.c test.pl
               test/cmp Tag: Embperl2 Execute.htm error.htm reqrec.htm
                        taint.htm
               test/conf Tag: Embperl2 httpd.conf.src
               test/html Tag: Embperl2 chdir.htm
               test/html/match Tag: Embperl2 div.htm
  Log:
  Embperl 2 - mod_perl tests
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.90.2.7  +2 -0      embperl/TODO
  
  Index: TODO
  ===================================================================
  RCS file: /home/cvs/embperl/TODO,v
  retrieving revision 1.90.2.6
  retrieving revision 1.90.2.7
  diff -u -r1.90.2.6 -r1.90.2.7
  --- TODO	2000/06/06 10:25:25	1.90.2.6
  +++ TODO	2000/06/06 14:39:11	1.90.2.7
  @@ -152,4 +152,6 @@
   
   - safe namespaces (importing Embperl functions)
   
  +- errdoc
   
  +- http_header / meta http-equiv -> http.htm
  
  
  
  1.7.2.4   +2 -2      embperl/embpcgi.bat
  
  Index: embpcgi.bat
  ===================================================================
  RCS file: /home/cvs/embperl/embpcgi.bat,v
  retrieving revision 1.7.2.3
  retrieving revision 1.7.2.4
  diff -u -r1.7.2.3 -r1.7.2.4
  --- embpcgi.bat	2000/06/05 13:55:58	1.7.2.3
  +++ embpcgi.bat	2000/06/06 14:39:11	1.7.2.4
  @@ -1,9 +1,9 @@
   @rem = '--*-Perl-*--
   @echo off
  -D:\Perl\5.00502\bin\MSWin32-x86\perl -x %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
  +/usr/bin/perl -x %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
   goto endofperl
   @rem ';
  -#!D:\Perl\5.00502\bin\MSWin32-x86\perl --
  +#!/usr/bin/perl --
   #line 8
   ###################################################################################
   #
  
  
  
  1.7.2.4   +1 -1      embperl/embpcgi.pl
  
  Index: embpcgi.pl
  ===================================================================
  RCS file: /home/cvs/embperl/embpcgi.pl,v
  retrieving revision 1.7.2.3
  retrieving revision 1.7.2.4
  diff -u -r1.7.2.3 -r1.7.2.4
  --- embpcgi.pl	2000/06/05 13:55:58	1.7.2.3
  +++ embpcgi.pl	2000/06/06 14:39:12	1.7.2.4
  @@ -1,4 +1,4 @@
  -#!D:\Perl\5.00502\bin\MSWin32-x86\perl 
  +#!/usr/bin/perl 
   ###################################################################################
   #
   #   Embperl - Copyright (c) 1997-1999 Gerald Richter / ECOS
  
  
  
  1.5.2.4   +2 -2      embperl/embpcgi.test.bat
  
  Index: embpcgi.test.bat
  ===================================================================
  RCS file: /home/cvs/embperl/embpcgi.test.bat,v
  retrieving revision 1.5.2.3
  retrieving revision 1.5.2.4
  diff -u -r1.5.2.3 -r1.5.2.4
  --- embpcgi.test.bat	2000/06/05 13:55:58	1.5.2.3
  +++ embpcgi.test.bat	2000/06/06 14:39:13	1.5.2.4
  @@ -1,9 +1,9 @@
   @rem = '--*-Perl-*--
   @echo off
  -D:\Perl\5.00502\bin\MSWin32-x86\perl -x -T %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
  +/usr/bin/perl -x -T %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
   goto endofperl
   @rem ';
  -#!D:\Perl\5.00502\bin\MSWin32-x86\perl --
  +#!/usr/bin/perl --
   #line 8
   ###################################################################################
   #
  
  
  
  1.7.2.4   +1 -1      embperl/embpcgi.test.pl
  
  Index: embpcgi.test.pl
  ===================================================================
  RCS file: /home/cvs/embperl/embpcgi.test.pl,v
  retrieving revision 1.7.2.3
  retrieving revision 1.7.2.4
  diff -u -r1.7.2.3 -r1.7.2.4
  --- embpcgi.test.pl	2000/06/05 13:55:58	1.7.2.3
  +++ embpcgi.test.pl	2000/06/06 14:39:13	1.7.2.4
  @@ -1,4 +1,4 @@
  -#!D:\Perl\5.00502\bin\MSWin32-x86\perl 
  +#!/usr/bin/perl 
   ###################################################################################
   #
   #   Embperl - Copyright (c) 1997-1999 Gerald Richter / ECOS
  
  
  
  1.18.2.4  +2 -2      embperl/embpexec.bat
  
  Index: embpexec.bat
  ===================================================================
  RCS file: /home/cvs/embperl/embpexec.bat,v
  retrieving revision 1.18.2.3
  retrieving revision 1.18.2.4
  diff -u -r1.18.2.3 -r1.18.2.4
  --- embpexec.bat	2000/06/05 13:56:01	1.18.2.3
  +++ embpexec.bat	2000/06/06 14:39:13	1.18.2.4
  @@ -1,9 +1,9 @@
   @rem = '--*-Perl-*--
   @echo off
  -D:\Perl\5.00502\bin\MSWin32-x86\perl -x %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
  +/usr/bin/perl -x %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
   goto endofperl
   @rem ';
  -#!D:\Perl\5.00502\bin\MSWin32-x86\perl --
  +#!/usr/bin/perl --
   #line 8
   ###################################################################################
   #
  
  
  
  1.18.2.4  +1 -1      embperl/embpexec.pl
  
  Index: embpexec.pl
  ===================================================================
  RCS file: /home/cvs/embperl/embpexec.pl,v
  retrieving revision 1.18.2.3
  retrieving revision 1.18.2.4
  diff -u -r1.18.2.3 -r1.18.2.4
  --- embpexec.pl	2000/06/05 13:56:01	1.18.2.3
  +++ embpexec.pl	2000/06/06 14:39:13	1.18.2.4
  @@ -1,4 +1,4 @@
  -#!D:\Perl\5.00502\bin\MSWin32-x86\perl 
  +#!/usr/bin/perl 
   ###################################################################################
   #
   #   Embperl - Copyright (c) 1997-1999 Gerald Richter / ECOS
  
  
  
  1.1.2.29  +5 -1      embperl/Attic/epdom.c
  
  Index: epdom.c
  ===================================================================
  RCS file: /home/cvs/embperl/Attic/epdom.c,v
  retrieving revision 1.1.2.28
  retrieving revision 1.1.2.29
  diff -u -r1.1.2.28 -r1.1.2.29
  --- epdom.c	2000/06/06 10:25:27	1.1.2.28
  +++ epdom.c	2000/06/06 14:39:13	1.1.2.29
  @@ -453,10 +453,14 @@
       tDomTree * pDomTree ;
       int		   n ;
       tNodeData * pDocument ;
  -
  +    tIndex      xOrgDomTree = pOrgDomTree -> xNdx ; 
  +    
  +    	
       n = ArrayAdd (&pDomTrees, 1) ;
       pDomTree = DomTree_self (n) ;
       pDomTree -> xNdx = n ;
  +    pOrgDomTree = DomTree_self (xOrgDomTree) ; /* relookup in case it has moved */
  +    
       pDomTree -> xDocument = pOrgDomTree -> xDocument ;
   
       ArrayClone (pOrgDomTree, &pDomTree -> pLookup) ; 
  
  
  
  1.65.2.9  +5 -1      embperl/epmain.c
  
  Index: epmain.c
  ===================================================================
  RCS file: /home/cvs/embperl/epmain.c,v
  retrieving revision 1.65.2.8
  retrieving revision 1.65.2.9
  diff -u -r1.65.2.8 -r1.65.2.9
  --- epmain.c	2000/06/06 10:25:27	1.65.2.8
  +++ epmain.c	2000/06/06 14:39:14	1.65.2.9
  @@ -2480,7 +2480,10 @@
                   oCommit (r, NULL) ;
   		#ifdef EP2
   		if (!bError)
  +		    {
   		    Node_toString (DomTree_self (r -> xCurrDomTree), r, r -> xDocument) ;
  +		    oputs (r, "\r\n") ;
  +		    }
   		#endif
   		}
   	    }
  @@ -2946,7 +2949,8 @@
   #endif
   	getcwd (olddir, sizeof (olddir) - 1) ;
   	
  -	chdir (dir) ;
  +	if (chdir (dir) < 0)
  +	   lprintf (r, "chdir error\n" ) ;
   	}
       else
   	r -> bOptions |= optDisableChdir ;
  
  
  
  1.57.2.17 +3 -3      embperl/test.pl
  
  Index: test.pl
  ===================================================================
  RCS file: /home/cvs/embperl/test.pl,v
  retrieving revision 1.57.2.16
  retrieving revision 1.57.2.17
  diff -u -r1.57.2.16 -r1.57.2.17
  --- test.pl	2000/06/06 10:25:29	1.57.2.16
  +++ test.pl	2000/06/06 14:39:14	1.57.2.17
  @@ -23,7 +23,7 @@
       'notfound.htm???1',
       'notallow.xhtm???1',
   ##    'noerr/noerrpage.htm???6?2',
  -    'errdoc/errdoc.htm???8?262144',
  +##    'errdoc/errdoc.htm???8?262144',
   ##    'rawinput/rawinput.htm????16',
       'var.htm',
       'varerr.htm???-1',
  @@ -56,7 +56,7 @@
       'includeerr1.htm???1',
       'includeerr2.htm???1',
       'registry/Execute.htm',
  -    'registry/errpage.htm???16',
  +##    'registry/errpage.htm???16',
       'registry/tied.htm???3',
       'registry/tied.htm???3',
   ##    'callsub.htm',
  @@ -81,7 +81,7 @@
       'nochdir/nochdir.htm?a=1&b=2???384',
       'match/div.htm',
       'match/div.asc',
  -    'http.htm',
  +##    'http.htm',
       'div.htm',
       'taint.htm???1',
       'ofunc/div.htm',
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.3.2.1   +18 -18    embperl/test/cmp/Execute.htm
  
  Index: Execute.htm
  ===================================================================
  RCS file: /home/cvs/embperl/test/cmp/Execute.htm,v
  retrieving revision 1.3
  retrieving revision 1.3.2.1
  diff -u -r1.3 -r1.3.2.1
  --- Execute.htm	1999/10/05 06:02:01	1.3
  +++ Execute.htm	2000/06/06 14:39:20	1.3.2.1
  @@ -1,18 +1,18 @@
   <HTML><TITLE>Test for HTML::Embperl::Execute</TITLE><BODY>
   <H1> 1.) Include from memory</H1>
  -<P>Here is some text</P>
  +<P>Here is some text</P>
   <H1> 2.) Include from memory with some Embperl code</H1>
  -<table><tr><td>a1</td><td>b2</td><td>c3</td></tr></table></P>
  +<table><tr><td>a1</td> <td>b2</td> <td>c3</td> </tr> </table> </P>
   <H1> 3.) Include from memory with passing of variables</H1>
  -<P>Transfer some vars Some Var !</P>
  +<P>Transfer some vars Some Var !</P>
   <H1> 4.) Change the variable, but not the code</H1>
  -<P>Transfer some vars Do it again !</P>
  +<P>Transfer some vars Do it again !</P>
   <H1> 5.) Use @param to pass parameters</H1>
  -<P>Use @param to transfer some data (1 2 3 4) !</P>
  +<P>Use @param to transfer some data (1 2 3 4) !</P>
   <H1> 6.) Use @param to pass parameters and return it</H1>
  -<H3> $p[0] is vara and $p[1] is varb<H3><P>Got data in @param (vara varb) !</P><P>Change data in @param to (newA newB) !</P>
  +<H3> $p[0] is vara and $p[1] is varb<H3><P>Got data in @param (vara varb) !</P><P>Change data in @param to (newA newB) !</P>
   <H3> $p[0] is now newA and $p[1] is now newB<H3><H1> 7.) Presetup %fdat and @ffld</H1>
  -<P><table><tr><td>fdat</td><td>text</td></tr><tr><td>test</td><td>value</td></tr></table></P>
  +<P><table><tr><td>fdat</td><td>text</td></tr><tr><td>test</td><td>value</td></tr></table></P>
   <H1> 8.) Inculde a file</H1>
   
   Here it starts with some HTML Text<P>
  @@ -35,14 +35,14 @@
   
   
   Now lets look what we are getting from this:<BR>
  -(this is the value in $a) (this is the value in $a) &auml;&ouml;&uuml;<BR>
  +(this is the value in $a) (this is the value in $a) &amp;auml;&amp;ouml;&amp;uuml;<BR>
   
  -And now a and b together: (this is the value in $a)(this is the value in $a) &auml;&ouml;&uuml;<P>
  +And now a and b together: (this is the value in $a)(this is the value in $a) &amp;auml;&amp;ouml;&amp;uuml;<P>
   
   Here we have some HTML tags within the perl code, Embperl will delete them!<BR>
   
   57
  -SELECT *  FROM a ORDER BY b USING &lt;; Hi There&gt;
  +SELECT * &lt;br&gt; FROM a ORDER BY b USING &lt;; Hi There&gt;
   Here we have something which looks like a HTML tag, but does not start with<br>
   a character, Embperl does not change them!<BR>
   
  @@ -53,14 +53,14 @@
   Now they should have a value
   
   $a = (this is the value in $a) <BR>
  -$b = (this is the value in $a) &auml;&ouml;&uuml; <BR>
  +$b = (this is the value in $a) &amp;auml;&amp;ouml;&amp;uuml; <BR>
   $c = 57 <BR>
   $d = 1 <BR>
   $e = 2 <BR>
   
   <P>Ok.<P>
   
  -
  +
   <H1> 9.) Inculde a file and return output in a scalar</H1>
   <H3>
   Here it starts with some HTML Text<P>
  @@ -70,7 +70,7 @@
   <P>
   
   $a = (this is the value in $a) <BR>
  -$b = (this is the value in $a) &auml;&ouml;&uuml; <BR>
  +$b = (this is the value in $a) &amp;auml;&amp;ouml;&amp;uuml; <BR>
   $c = 57 <BR>
   $d = 1 <BR>
   $e = 2 <BR>
  @@ -83,14 +83,14 @@
   
   
   Now lets look what we are getting from this:<BR>
  -(this is the value in $a) (this is the value in $a) &auml;&ouml;&uuml;<BR>
  +(this is the value in $a) (this is the value in $a) &amp;auml;&amp;ouml;&amp;uuml;<BR>
   
  -And now a and b together: (this is the value in $a)(this is the value in $a) &auml;&ouml;&uuml;<P>
  +And now a and b together: (this is the value in $a)(this is the value in $a) &amp;auml;&amp;ouml;&amp;uuml;<P>
   
   Here we have some HTML tags within the perl code, Embperl will delete them!<BR>
   
   57
  -SELECT *  FROM a ORDER BY b USING &lt;; Hi There&gt;
  +SELECT * &lt;br&gt; FROM a ORDER BY b USING &lt;; Hi There&gt;
   Here we have something which looks like a HTML tag, but does not start with<br>
   a character, Embperl does not change them!<BR>
   
  @@ -101,14 +101,14 @@
   Now they should have a value
   
   $a = (this is the value in $a) <BR>
  -$b = (this is the value in $a) &auml;&ouml;&uuml; <BR>
  +$b = (this is the value in $a) &amp;auml;&amp;ouml;&amp;uuml; <BR>
   $c = 57 <BR>
   $d = 1 <BR>
   $e = 2 <BR>
   
   <P>Ok.<P>
  -
   
  +
   </H3>
   <H1> 10.) Done :-)</H1>
   </body></html>
  
  
  
  1.5.2.5   +8 -8      embperl/test/cmp/error.htm
  
  Index: error.htm
  ===================================================================
  RCS file: /home/cvs/embperl/test/cmp/error.htm,v
  retrieving revision 1.5.2.4
  retrieving revision 1.5.2.5
  diff -u -r1.5.2.4 -r1.5.2.5
  --- error.htm	2000/05/31 06:21:51	1.5.2.4
  +++ error.htm	2000/06/06 14:39:21	1.5.2.5
  @@ -2,16 +2,16 @@
   <H1>Internal Server Error</H1>
   The server encountered an internal error or misconfiguration and was unable to complete your request.<P>
   ^Please contact the server administrator\,.*?and inform them of the time the error occurred\, and anything you might have done that may have caused the error
  -^^\[.*?\]ERR:  32: Line \d+: Warning in Perl code: Unquoted string &quot;qqqqqqqqqqqqqq&quot; may clash with future reserved word at test/html/error.htm line \d+.<p>
  -^^\[.*?\]ERR:  32: Line \d+: Warning in Perl code: Use of uninitialized value at test/html/error.htm line \d+.<p>
  -^^\[.*?\]ERR:  32: Line \d+: Warning in Perl code: Bareword found where operator expected at test/html/error.htm line \d+, near &quot;\$error is&quot;<p>
  +^^\[.*?\]ERR:  32: Line \d+: Warning in Perl code: Unquoted string &quot;qqqqqqqqqqqqqq&quot; may clash with future reserved word at .*?error.htm line \d+.<p>
  +^^\[.*?\]ERR:  32: Line \d+: Warning in Perl code: Use of uninitialized value at .*?error.htm line \d+.<p>
  +^^\[.*?\]ERR:  32: Line \d+: Warning in Perl code: Bareword found where operator expected at .*?error.htm line \d+, near &quot;\$error is&quot;<p>
   ^^\[.*?\]ERR:  32: Line \d+: Warning in Perl code: 	\(Missing operator before is\?\)<p>
  -^\[.*?\]ERR:  24: Line \d+: Error in Perl code: syntax error at test/html/error.htm line \d+, at EOF
  -^<br>&nbsp;&nbsp;&nbsp;&nbsp;syntax error at test/html/error.htm line \d+, at EOF
  -^<br>&nbsp;&nbsp;&nbsp;&nbsp;syntax error at test/html/error.htm line \d+, near &quot;\$error is here &quot;
  -^<br>&nbsp;&nbsp;&nbsp;&nbsp;syntax error at test/html/error.htm line \d+, near &quot;}
  +^\[.*?\]ERR:  24: Line \d+: Error in Perl code: syntax error at .*?error.htm line \d+, at EOF
  +^<br>&nbsp;&nbsp;&nbsp;&nbsp;syntax error at .*?error.htm line \d+, at EOF
  +^<br>&nbsp;&nbsp;&nbsp;&nbsp;syntax error at .*?error.htm line \d+, near &quot;\$error is here &quot;
  +^<br>&nbsp;&nbsp;&nbsp;&nbsp;syntax error at .*?error.htm line \d+, near &quot;}
   ^<br>&nbsp;&nbsp;&nbsp;&nbsp; _ep_cp&quot;
  -^<br>&nbsp;&nbsp;&nbsp;&nbsp;syntax error at test/html/error.htm line \d+, near &quot;
  +^<br>&nbsp;&nbsp;&nbsp;&nbsp;syntax error at .*?error.htm line \d+, near &quot;
   ^<br>&nbsp;&nbsp;&nbsp;&nbsp;
   ^<br>&nbsp;&nbsp;&nbsp;&nbsp;}&quot;<p>
   ^\[.*?\]ERR:  24: Line \d+: Error in Perl code: <p>
  
  
  
  1.4.2.1   +1 -1      embperl/test/cmp/reqrec.htm
  
  Index: reqrec.htm
  ===================================================================
  RCS file: /home/cvs/embperl/test/cmp/reqrec.htm,v
  retrieving revision 1.4
  retrieving revision 1.4.2.1
  diff -u -r1.4 -r1.4.2.1
  --- reqrec.htm	1999/10/05 06:02:20	1.4
  +++ reqrec.htm	2000/06/06 14:39:21	1.4.2.1
  @@ -6,7 +6,7 @@
   
   $conf =  <br> 
   ^\$_\[0\] = HTML::Embperl::Req=SCALAR\(0x.*?\) <br> 
  -$_[1] =  <br> 
  +^\$_\[1\] =.*?<br> 
   
   ^\$rec_rec  = Apache=SCALAR\(0x.*?\)<br>
   ^\$\$rec_rec = \d+<br>
  
  
  
  1.2.2.1   +1 -2      embperl/test/cmp/taint.htm
  
  Index: taint.htm
  ===================================================================
  RCS file: /home/cvs/embperl/test/cmp/taint.htm,v
  retrieving revision 1.2
  retrieving revision 1.2.2.1
  diff -u -r1.2 -r1.2.2.1
  --- taint.htm	1999/05/07 20:13:50	1.2
  +++ taint.htm	2000/06/06 14:39:21	1.2.2.1
  @@ -2,8 +2,7 @@
   <H1>Internal Server Error</H1>
   The server encountered an internal error or misconfiguration and was unable to complete your request.<P>
   ^Please contact the server administrator\,.*?and inform them of the time the error occurred\, and anything you might have done that may have caused the error\.
  -^\[.*?\]ERR\:  24\: Line 15\: Error in Perl code\: Insecure \$ENV\{PATH\} while running with \-T switch
  -^\[.*?\]ERR\:  32\: Line 15\: Warning in Perl code\: Use of uninitialized value
  +^\[.*?\]ERR\:  24\: Line \d+\: Error in Perl code\: Insecure \$ENV\{PATH\} while running with \-T switch
   ^ HTML::Embperl .*?<P>
   </BODY></HTML>
   
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.19.2.2  +0 -1      embperl/test/conf/httpd.conf.src
  
  Index: httpd.conf.src
  ===================================================================
  RCS file: /home/cvs/embperl/test/conf/httpd.conf.src,v
  retrieving revision 1.19.2.1
  retrieving revision 1.19.2.2
  diff -u -r1.19.2.1 -r1.19.2.2
  --- httpd.conf.src	2000/06/05 10:07:01	1.19.2.1
  +++ httpd.conf.src	2000/06/06 14:39:22	1.19.2.2
  @@ -99,7 +99,6 @@
   PerlHandler HTML::Embperl
   Options ExecCGI
   PerlSetEnv LOC embperl
  -PerlSetEnv EMBPERL_OPTIONS 128
   </Location>
   
   <Location /embperl/safe>
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.4.2.1   +1 -1      embperl/test/html/chdir.htm
  
  Index: chdir.htm
  ===================================================================
  RCS file: /home/cvs/embperl/test/html/chdir.htm,v
  retrieving revision 1.4
  retrieving revision 1.4.2.1
  diff -u -r1.4 -r1.4.2.1
  --- chdir.htm	1999/10/05 06:03:37	1.4
  +++ chdir.htm	2000/06/06 14:39:24	1.4.2.1
  @@ -8,7 +8,7 @@
   
   [- use Cwd  -]
   
  -Script  CWD: [+ $script = fastcwd +] <BR>
  +Script  CWD: [+ $script = getcwd +] <BR>
   Embperl CWD: [+ $ep =     $HTML::Embperl::cwd +] <BR>
   $0: [+ $abs = $0 +]
   
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.1.2.1 +6 -2      embperl/test/html/match/div.htm
  
  Index: div.htm
  ===================================================================
  RCS file: /home/cvs/embperl/test/html/match/div.htm,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.1.2.1
  diff -u -r1.1.2.1 -r1.1.2.1.2.1
  --- div.htm	1998/07/14 20:11:25	1.1.2.1
  +++ div.htm	2000/06/06 14:39:24	1.1.2.1.2.1
  @@ -169,20 +169,24 @@
   </table>
   
   <table border="2" width="100%">
  -    <tr>
  +    [$ if $row == 0 $]
  +	<tr>
           <th>1</th>
           <th>2</th>
           <th>3</th>
       </tr> 
  -    <tr>
  +    [$endif$]
  +	<tr>
           <td>[+ $a[$row][$col] +] </td>
       </tr> 
   </table>
   
   <table border="2" width="100%">
  +    [$ if $row == 0 $]
       <tr>
           <th>[+ $b[2][$col] +]</th>
       </tr> 
  +	[$endif$]
       <tr>
           <td>[+ $a[$row][$col] +] </td>
       </tr>