home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
WinFiles.com 1998 June
/
WF0698_3.ISO
/
servers-websrv
/
websuite.exe
/
GUESTBK3.AP_
/
GUESTBK3.AP
Wrap
Text File
|
1998-04-01
|
1KB
|
51 lines
<[
// SmartDesk's Personal Web Desktop - Guest Book #3
// (c) 1997-98 SmartDesk, Inc., All Rights Reserved
_apGenerate( )
websrvr = 0 + param( 1 )
sessionId = 0 + param( 2 )
session = new( "session", websrvr, sessionId )
from = session.var( "FROM" )
if ( strempty( from ) )
session.response( "<H2>Who'd you say this was from again?</H2>" )
return( 0 )
end
msg = session.var( "MSG" )
if ( strempty( msg ) )
session.response( "<H2>I'm sorry, did you mean to tell me something?</H2>" )
return( 0 )
end
msg = strswap( msg, "\r", "<BR>" )
basedir = webServerHome( websrvr )
filename = basedir + "\\system\\guestbk.dat"
if ( ! fileExists( filename ) )
hfile = fileCreate( filename )
else
hfile = fileOpen( filename, 2 )
end
if ( hfile < 1 )
session.response( "<H2>File Access Error.</H2>" )
return( 0 )
end
len = flen( hfile )
if ( len > 0 )
fileSeek( hfile, len, 0 )
end
fwriteline( hfile, date( "MMMM DDDD, YYYY at " ) + timetostr( time( ), 0 ) + "m|" + msg + "|" + from )
fileClose( hfile )
! webHeader( )
! "<H2>Record Successfully Entered!</H2>"
! "<A HREF=\"guestbk.htm\">Continue...</A>"
! webFooter( )
]>