%@Language = "VBScript" ENABLESESSIONSTATE=False%> <% Option Explicit 'Server.Transfer "index.htm" 'Response.Redirect "index.htm" Response.Buffer = True Response.Expires = -1 Server.ScriptTimeout =180 %> <% Const sButtonSubmit = "Отправить вопрос" Dim sScript Dim oConn Dim oRS Dim sSql Dim sError Dim lq_id Dim sName Dim dtPosted Dim sBody Dim sLocation Dim oFormCol Dim sAction Dim sMsgAlert sScript = Request.ServerVariables("SCRIPT_NAME") ' Path to current script If Request.ServerVariables("REQUEST_METHOD") = "POST" then Set oFormCol = Request.Form Else 'GET Set oFormCol =Request.QueryString End if sMsgAlert="" sAction= ToStr(oFormCol("SubmitButton")) IF sAction = sButtonSubmit Then sName =TrimExtraWhiteSpace(ToStr(oFormCol("name"))) sLocation =TrimExtraWhiteSpace(ToStr(oFormCol("location"))) sBody =TrimExtraWhiteSpace(ToStr(oFormCol("body"))) sName=TrimExtraString(sName,255) sLocation=TrimExtraString(sLocation,255) sBody=TrimExtraString(sBody,2048) if CheckForm() Then if ProcSend() Then Response.Redirect sScript end if end if End If set oFormCol = Nothing %>
|