2003-01-19 11:57:27 -05:00
( define-structure surflet surflet-interface
2002-12-08 10:49:27 -05:00
( open scheme-with-scsh
2003-01-19 11:57:27 -05:00
simple-surflet-api )
2002-11-03 12:43:58 -05:00
( begin
( define ( main req )
( let* ( ( answers
( form-query
( list
( list 'name "Full Name" )
( list 'pwd ( make-password "Password" ) )
( list 're-pwd ( make-password "Retype password" ) )
( list 'yob ( make-number "Year of birth" ) )
( list 'mail? ( make-boolean "Subscribe to mailing list" ) )
( list 'payment ( make-yes-no "Pay per" "bill" "card" ) )
( list 'date-of-bill
( make-radio "Pay at"
2003-01-19 12:01:44 -05:00
( list "first" "middle" "end of month." ) ) ) ) ) )
2002-11-03 12:43:58 -05:00
)
( if ( string=? ( extract/single 'pwd answers )
( extract/single 're-pwd answers ) )
( begin
( inform ( format #f "Hi ~a, you're password is ~s, you were born in ~a, you ~a to the mailing list and you pay per ~a at ~a of month. Click continue to perform recording."
( extract/single 'name answers )
( extract/single 'pwd answers )
( extract/single 'yob answers )
( if ( extract/single 'mail? answers )
"have subscribed"
"did not subscribe" )
( extract/single 'payment answers )
( car ( ( infix-splitter )
( extract/single 'date-of-bill answers ) ) ) ) )
( final-page "Data recorded." ) )
( begin
2003-01-19 12:01:44 -05:00
( inform ( format #f "Hi ~a, you've misspelled your password. Go back and retype it."
( extract/single 'name answers ) ) )
2002-11-03 12:43:58 -05:00
( final-page "Your registration has been canceled." ) ) ) ) )
) )