Files
harbour-core/harbour/examples/hscript/dir.hs
Viktor Szakats 461ea1568f 2009-05-29 11:04 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
- contrib/examples
  + examples
  * doc/dirstruc.txt
  * doc/whatsnew.txt
  * examples/hbdoc/Makefile
  * examples/pp/Makefile
  * examples/hboleold/Makefile
  * examples/hbsqlit2/Makefile
  * examples/misc/Makefile
  * examples/hbapollo/Makefile
  * examples/rdddbt/Makefile
  * examples/guestbk/Makefile
  * examples/pe/Makefile
  * examples/hbgf/hbgfwin/Makefile
  * examples/hbgf/hbgfos2/Makefile
  * examples/hbgf/hbgfgtk/Makefile
  * examples/hbgf/Makefile
  * examples/uhttpd/readme.txt
  * examples/dbu/Makefile
  * examples/hscript/Makefile
  * examples/hbwhat/Makefile
  * examples/rl/Makefile
  * examples/Makefile
    * Moved to flatten our dir layout and sync the locations
      in unified distro and source tree.
    ; TODO: As a next step I'll replace Makefiles with .hbm 
            files. This will allow users to build these parts 
            outside the source distribution.
2009-05-29 09:05:10 +00:00

55 lines
900 B
Haskell

<%
/*
* $Id$
*/
/*
* Written by Felipe Coury <fcoury@flexsys-ci.com>
* www - http://www.harbour-project.org
*
*/
FUNCTION Start()
LOCAL aDir := Directory( "*.*" )
LOCAL i
IF !Empty( GetEnv( "SERVER_NAME" ) )
OutStd( "HTTP/1.0 200 OK" + chr(10) )
OutStd( "CONTENT-TYPE: TEXT/HTML" + chr(10) + chr(10) )
ENDIF
ASort( aDir,,, { |x, y| x[1] < y[1] } )
%>
<HTML>
<HEAD><TITLE>dir.hs - HarourScript demo of active context</TITLE></HEAD>
<BODY>
<TABLE border=1>
<TR>
<TD><B>File Name</B></TD>
<TD><B>Size</B></TD>
<TD><B>Date</B></TD>
<TD><B>Time</B></TD>
<TD><B>Attributes</B></TD>
</TR>
<%
FOR i := 1 TO Len( aDir )
%>
<TR>
<TD><% OutStd( aDir[i,1] ) %></TD>
<TD><% OutStd( aDir[i,2] ) %></TD>
<TD><% OutStd( aDir[i,3] ) %></TD>
<TD><% OutStd( aDir[i,4] ) %></TD>
<TD><% OutStd( aDir[i,5] ) %></TD>
</TR>
<%
NEXT
%>
</TABLE>
</BODY>
</HTML>
<%
RETURN( NIL )
%>