%
Dim Form: Set Form = New ASPForm %><%
Server.ScriptTimeout = 2000
Form.SizeLimit = &HA00000
If Form.State = 0 Then 'Completted
Dim DestinationPath, fDestination
DestinationPath = Server.mapPath("seminar")
Form.Files.Save DestinationPath
'replace typo chars in title string
dim sMyString
sMyString = Replace(Form("title"), "'", " ")
sMyString = Replace(sMyString , """", " ")
dim sPresentationDate
sPresentationDate = Form("present_date")
dim todaysDate
todaysDate=now()
if (sPresentationDate = "") then
'sPresentationDate = FormatDateTime(todaysDate,2)
end if
dim public_value
if Form("public")="" then
public_value = "No"
else
public_value = "Yes"
end if
'update information to DB
conn.Execute("insert into seminar (title, file, present_date, public1, public_after) values ('"& sMyString &"','"& Form("File1").FileName & "','"& Form("present_date") & "','" & public_value & "','" & Form("public_after") &"')")
response.Redirect("presentation.asp")
ElseIf Form.State > 10 then
Const fsSizeLimit = &HD
Select case Form.State
case fsSizeLimit: response.write "
Source form size (" & Form.TotalBytes & "B) exceeds form limit (" & Form.SizeLimit & "B)
"
case else response.write "
Some form error.
"
end Select
End If
%>
Add a new presentation | ||
(*) Required fields |