home *** CD-ROM | disk | FTP | other *** search
/ Australian Personal Compu…g and running Windows 98 / win98pb.iso / netkit / smartdes / websuite.exe / DOWNLOAD.AP_ / DOWNLOAD.AP
Encoding:
Text File  |  1998-04-01  |  2.0 KB  |  80 lines

  1. <[
  2. // Personal Web Server - Download AP
  3. // (c) 1997-98 SmartDesk, Inc., All Rights Reserved
  4.  
  5. websrvr = 0 + param( 1 )
  6. sessionId = 0 + param( 2 )
  7.  
  8. session = new( "session", websrvr, sessionId )
  9.  
  10. ]>
  11. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
  12. <!5thGEN Active Pages, by www.smartdesk.com>
  13. <HTML>
  14. <TITLE>Personal Web Server - Public Download Area</TITLE>
  15. <BODY BGCOLOR="#000000" LINK="#FFFFFF" VLINK="#FFFFFF" TEXT="#FFFFFF">
  16.  
  17. <TABLE BORDER=0 WIDTH=600>
  18.  <TR>
  19.   <TD VALIGN="top" WIDTH=120>
  20.    <CENTER>
  21.    <A HREF="/index.htm"><IMG SRC="/image/earth.gif" WIDTH=80 HEIGHT=80 BORDER=0></A><BR>
  22.    <FONT COLOR="#FFFFFF" SIZE=1><FONT COLOR="#00FFFF">©Copyright 1997-98</FONT><BR>by SmartDesk, Inc.<BR>All Rights Reserved<BR></FONT>
  23.    <P><A HREF="/index.htm">Home</A></P>
  24.    </CENTER>
  25.  
  26.   </TD>
  27.   <TD WIDTH=50>
  28.   </TD>
  29.   <TD WIDTH=425>
  30.  
  31.    <CENTER>
  32.    <P><FONT SIZE=5 COLOR="00FFFF"><B>Public Download Area</B></FONT><BR></P>
  33.    </CENTER>
  34.  
  35.    <P><BR></P>
  36.  
  37. <[
  38.     path = webServerHome( websrvr ) + "\\download\\*.*"
  39.     fname = fileFindFirst( path, 0 )
  40.     if ( strempty( fname ) )
  41.         session.response( "<H2>No files available for download...</H2><a href=\"/\">Back</a>...", "FFFFFF", "000000", "00FFFF" )
  42.         return( 1 )
  43.     end
  44.  
  45.     i = 1
  46.     while ( ! strempty( fname ) )
  47.         files[ i++ ] = lower( fname )
  48.         fname = fileFindNext( )    
  49.     end
  50.  
  51.     asort( @files )
  52.  
  53.    ! "<TABLE BORDER=0 WIDTH=425>"
  54.  
  55.     for ( i=1; i<=len( files ); i++ )
  56.  
  57.            ! " <TR>"
  58.          ! "  <TD VALIGN=\"top\" WIDTH=100>"
  59.         ! "   <a href=\"/download/" + files[i]  + "\">" + files[i] + "</a>"
  60.         ! "  </TD>"
  61.         
  62.         filename = webServerFile( websrvr, "/download/" + files[i] )
  63.  
  64.          ! "  <TD WIDTH=70>" + fileDate( filename ) + "  </TD>"
  65.          ! "  <TD WIDTH=50>" + fileTime( filename ) + "  </TD>"
  66.          ! "  <TD ALIGN=right WIDTH=80>" + strcommas( "" + fileSize( filename ) ) + "  </TD>"
  67.         
  68.         ! " </TR>"
  69.     end
  70.     ! "</TABLE>"
  71. ]>
  72.  
  73.   </TD>
  74.  </TR>
  75. </TABLE>
  76. <br><br><br><br>
  77.  
  78. <[! webFooter( )]>
  79.  
  80.