VBScript
現在ASPをもとにWebサイトを作成しています。
「Microsoft VBScript コンパイラーエラー(0X800A03F6) 'End'がありません。」と出るのですが、どこが原因なのでしょうか?
<%@ LANGUAGE="VBSCRIPT" %>
<%
' ####################
' ### データ送信用 ###
' ####################
StrUsername = Request.Form("username")
StrUruby = Request.Form("uruby")
StrDatofbirth = Request.Form("dayofbirth")
StrEmail1 = Request.Form("email1")
StrEmail2 = Request.Form("email2")
StrGender = Request.Form("gender")
StrPostnumber = Request.Form("postnumber")
StrAddress = Request.Form("address")
StrTel1 = Request.Form("tel1")
StrTel2 = Request.Form("tel2")
StrSchool = Request.Form("school")
StrFaculty = Request.Form("faculty")
StrDepartment = Request.Form("department")
StrSurvey = Request.Form("survey")
StrComment = Request.Form("comment")
StrDesiredjobtype = Request.Form("desiredjobtype")
if username = "" then
username = "未入力"
end if
if uruby = "" then
uruby = "未入力"
end if
if dayofbirth = "" then
dayofbirth = "未入力"
end if
if email1 = "" then
email1 = "未入力"
end if
if email2 = "" then
email2 = "未入力"
end if
if gender = "" then
gender = "未入力"
end if
if postnumber = "" then
postnumber = "未入力"
end if
if address = "" then
address = "未入力"
end if
if tel1 = "" then
tel1 = "未入力"
end if
if tel2 = "" then
tel2 = "未入力"
end if
if faculty = "" then
faculty = "未入力"
end if
if department = "" then
department = "未入力"
end if
if survey = "" then
survey = "未入力"
end if
if comment = "" then
comment = "未入力"
end if
if desiredjobtype = "" then
desiredjobtype = "未入力"
<!-- ERRORカウンタの初期化
errnum = ""
' ###
' ### sqlインジェクション対策 ###
' ###]
if errnum <> "" Then
Response.Redirect "http://localhost/tesut/chkerr.asp?errnum="+ errnum
End If
<!-- パラメータ
LIST = Array(username,uruby,dayofbirth,email1,email2,gender,postnumber,address,tel1,tel2,school,faculty,department,survey,comment,desiredjobtype)
<!-- 検出項目(SQLコマンドで使用される特殊記号の検出)
CHECK_1 = Array("<",">","&","'","+","-","*","/","%",";","--","(",")","\","""",",")
<!-- ハンドリング要素
ERROR = Array("A","B","C","D")
For j = 0 to UBound(LIST)
tmpData = UCase(LIST(j))
For i = 0 to UBound(CHECK_1)
If Instr(tmpData,CHECK_1(i)) > 0 Then
errnum = errnum + ERROR(j)
Exit For
End If
Next
Next
if errnum <> "" Then
Response.Redirect "http://localhost/tesut/chkerr.asp?errnum="+ errnum
End If
<!-- POSTで遅れないのでセションに保存
Session.Contents("username") = username
Session.Contents("uruby") = uruby
Session.Contents("dayofbirth") = dayofbirth
Session.Contents("email1") = email1
Session.Contents("email2") = email2
Session.Contents("gender") = gender
Session.Contents("postnumber") = postnumber
Session.Contents("address") = address
Session.Contents("tel1") = tel1
Session.Contents("tel2") = tel2
Session.Contents("school") = school
Session.Contents("faculty") = faculty
Session.Contents("department") = deaprtment
Session.Contents("survey") = survey
Session.Contents("comment") = comment
Session.Contents("desiredjobtype") = deairedjobtype
Response.Redirect "http://localhost/tesut/check.asp"
<!-- xssの記号検出処理
Function XssChk(Str)
err = 0
If Instr(Str,"<") > 0 Then
err = err + 1
End If
If Instr(Str,">") > 0 Then
err = err + 1
End If
If Instr(Str,"&") > 0 Then
err = err + 1
End If
If Instr(Str,"'") > 0 Then
err = err + 1
End If
If Instr(Str,"""") > 0 Then
err = err + 1
End If
XssChk = err
End Function
%>
お礼
回答ありがとうございます。自己解決したので、回答を見るのを忘れてました。 デバッグ用の出力はして、値は正常でした。 原因は何かわからなかったので、 判定のところに if valArr(selectedVal) = valArr(hoge) then と要素でチェックを掛けてやれば、動きました。 お礼が遅くなり申し訳ございませんでした。