<% Dim ResultHTML Dim myMessage As New MailMessage Dim myMail As New SmtpMail Dim strEmail As String 'Some value greater than default of 60s (According to upload size.) 'The maximum speed is about 100kB/s for IIS4, P200 and local upload, 4kB/s for modem users. Server.ScriptTimeout = 300 Dim DestinationPath DestinationPath = Server.MapPath("abstracts")'Folder to store uploaded files LogFolder = Server.MapPath("abstracts") 'Folder to store log file with info about upload request. 'Set upload limit to 2MB UploadSizeLimit = 2000000 If Request.ServerVariables("REQUEST_METHOD") = "POST" Then 'Request method must be "POST" for get the fields ' BeginTimer 'Starts timer. '************************************************* Main Upload - start Dim Upload on error resume next 'Gets uploaded fields Set Upload = GetUpload() Set Paper=Server.CreateObject("ADODB.Connection") Paper.open "PaperRAD01" Set Paperrecords=Server.CreateObject("ADODB.RecordSet") Paperrecords.Open "RAD01", Paper,adOpenStatic,adLockOptimistic Paperrecords.Addnew Paperrecords("PAPERTITLE")=Upload("PAPERTITLE").Value.String Paperrecords("AUTHORS")=Upload("AUTHORS").Value.String Paperrecords("FIRSTNAME")=Upload("FIRSTNAME").Value.String Paperrecords("SURNAME")=UCASE(Upload("SURNAME").Value.String) Paperrecords("AFFI")=Upload("AFFI").Value.String Paperrecords("COUNTRY")=UCASE(Upload("COUNTRY").Value.String) Paperrecords("NETWORK")=Upload("NETWORK").Value.String Paperrecords("DATE")=Date() Paperrecords.Update Paperrecords.Close Set Paperrecords=nothing Paper.close Set Paper=nothing myMessage.From = "webmaster@" & Request.ServerVariables("SERVER_NAME") myMessage.To = "gurun@mercury.me.metu.edu.tr" myMessage.Subject = "E-mail Sample from ASP 101!" myMessage.Body = "Merhaba" myMail.Send(myMessage) 'There are all of form fields in the Fields object. Example : 'Upload("File1").ContentType - content type of File1 field 'Upload("File1").Value.String - File1 field converted to a string 'Upload("File1").Value.ByteArray - File1 field as safearray to store in binary RS field or file 'Upload("Comments").Value.String - value of Comments field 'See HTML documentation of FormFields class (ScriptUtilities, http://www.pstruh.cz) ResultHTML = "" If Err.Number = 0 Then Response.Write "

"" Upload was OK ! ""

" 'Write statistics about upload. Optional. 'Saves the fields to the disk, writes result to the client and writes log. 'See utils.inc. You can change the function to save the files to another location. ResultHTML = ResultHTML & "
" & SaveUpload(Upload, DestinationPath, LogFolder) Else Response.Write "

"" ERROR in Upload ! ""

" Response.Write "

"" Please FILL ALL areas ! ""

" ' Write the error 'The error can be one of : 'Upload size exceeds limit 'Zero length request 'No file sent 'Bad request method - must be post ResultHTML = ResultHTML & "
Error : " & Err.Description End If On Error GoTo 0 Upload = Empty 'Clear the variable '************************************************* Main Upload - end ' EndTimer 'Writes info about consumed time. End If 'Request method must be "POST" %> <%'upload.inc, contains GetUpload function, Required for upload - only the one file%> <%'utils.inc, contains SaveUpload function%> <%'format.inc, contains head and Foot function, optional.%> <% response.write Head("Sample multiple binary files upload via ASP", "Demonstrates using of the ByteArray class for working with binary data from Request.BinaryRead.") response.write upDescription response.write CheckRequirements %>

RAD-01, Int. Symposium on Radiative Transfer
Antalya, Turkey, 17-22 June, 2001


Please upload your final abstract, in camera-ready form and preferably in pdf format (or as MS-Word document), to arrive before May 1, 2001.

PAPER INFORMATION CORRESPONDING AUTHOR
Paper Title :
First Name:
Authors:
Surname:
Affiliation:
Upload Paper :
Country:
E-Mail:



Please NOTE that all areas must be filled in and you can upload files of maximum 2 MB size.
<%=ResultHTML%> <%=Foot%>