Files
harbour-core/harbour/contrib/examples/hscript/dir.hs
Viktor Szakats 6e47dd35f5 2007-11-10 18:03 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* Makefile
   - samples
   + contrib/examples
   * contrib/Makefile
   * contrib/examples/Makefile
   * contrib/examples/guestbk/inifiles.prg
   * contrib/examples/guestbk/testcgi.prg
   * contrib/examples/guestbk/bld_b32.bat
   * contrib/examples/guestbk/Makefile
   * contrib/examples/pe/pe.prg
   * contrib/examples/pe/Makefile
   * contrib/examples/misc/Makefile
   * contrib/examples/hscript/bld_b32.bat
   * contrib/examples/hscript/Makefile
   * contrib/examples/Makefile
     * Moved /samples to /contrib/examples
2007-11-10 17:04:20 +00:00

51 lines
887 B
Haskell

<%
/*
* Written by Felipe Coury <fcoury@flexsys-ci.com>
* www - http://www.harbour-project.org
*
*/
FUNCTION Start()
LOCAL aDir := directory( "c:\*.*" )
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 )
%>