<%
Set db=Server.CreateObject("ADODB.Connection")
db.Open "EQCHRMDB"
'Set rsKankyo=Server.CreateObject("ADODB.Recordset")
Set rsKankyo=db.Execute("Select * From q_env ;")
rtn=rsKankyo.fields("rtn")
'Set rsBunsho=Server.CreateObject("ADODB.Recordset")
value1 = Request.Form("bun")
'value1="4-3-1T3-4#青森県"
call ChapSecTerm(value1,chapter1,paragraph1,term1,Word)
ChapNo = chapter1
SecNo =paragraph1
TermNo = term1
chapter =chapter
paragraph =paragraph1
term = term1
'where=" 章 = " + ChapNo + " And 節 = " + SecNo + " And 項 = " + TermNo
where=" 章 = " + chapter1 + " And 節 = " + paragraph1 + " And 項 = " + term1
'Set rsBunsho = Db.OpenRecordset _
' ("select * from q_bunsho Where (章 = " + ChapNo _
' + " And 節 = " + SecNo + " And 項 = " + TermNo + ")")
Set rsBunsho=db.Execute("Select * From q_bunsho where (" & where & ") ;")
If TermNo > 0 Then
title = ChapNo + "-" + SecNo + "-" + TermNo
ElseIf SecNo > 0 Then
title = ChapNo + "-" + SecNo
Else
title = ChapNo
End If
'If Not IsNull(rsBunsho.Fields("文章")) Then
Bunsho = rsBunsho.Fields("文章")
title2 = rsBunsho.Fields("タイトル")
Response.Write ""
Response.Write "
"
trs = trs + ""
trs = trs + ""
trs = trs + "
"
'
'グラフの一リストに図表名を追加する。
NofZuhyo = 0
i = 1
Do
If (Mid(textString, i, Len(selectedTerm)) = selectedTerm) And i < Len(textString) Then
icount = icount + 1
trs = trs + ""
trs = trs + ""
trs = trs + ""
trs = trs + "" _
+ selectedTerm + ""
trs = trs + ""
trs = trs + ""
trs = trs + ""
i = i + Len(selectedTerm)
ElseIf (Mid(textString, i, 1) = "図" Or Mid(textString, i, 1) = "表") And i < Len(textString) Then
head = Mid(textString, i, 1)
'Print #1, "" + title + ""
i1 = i + 1
ZuhyoName = GetNo(Mid(textString, i1, 5))
If Mid(textString, i, 1) = "図" Then
HTMLink = "../f" + ZuhyoName + ".htm"
Else
HTMLink = "../t" + ZuhyoName + ".htm"
End If
If ZuhyoName <> "" And Not IsNull(ZuhyoName) Then
trs = trs + "" _
+ Mid(textString, i, 1) + ZuhyoName + ""
i = i + 1 + Len(ZuhyoName)
Else
trs = trs + Mid(textString, i, 1)
i = i + 1
End If
ElseIf (Mid(textString, i, 2) = "付図" _
Or Mid(textString, i, 2) = "付表") And i < Len(textString) Then
head = Mid(textString, i, 2)
i1 = i + 2
ZuhyoName = GetNo(Mid(textString, i1, 5))
If Mid(textString, i, 2) = "付図" Then
HTMLink = "af" + ZuhyoName + ".htm"
Else
HTMLink = "at" + ZuhyoName + ".htm"
End If
If ZuhyoName <> "" And Not IsNull(ZuhyoName) Then
trs = trs + "" _
+ Mid(textString, i, 2) + ZuhyoName + ""
i = i + 2 + Len(ZuhyoName)
Else
trs = trs + Mid(textString, i, 2)
i = i + 2
End If
Else
trs = trs + Mid(textString, i, 1)
i = i + 1
End If
Loop Until i > Len(textString)
icount = icount + 1
trs = trs + "
"
trs = trs + ""
trs = trs + ""
trs = trs + " "
trsZuhyoBtnYogo = trs
End Function
Function trsRtnCode(chr0, rtn)
trs = ""
i = 1
Do
If Mid(chr0, i, 2) = Mid(rtn, 1, 2) And i < Len(chr0) Then
trs = trs + ""
i = i + 2
Else
trs = trs + Mid(chr0, i, 1)
i = i + 1
End If
Loop Until i > Len(chr0)
trsRtnCode = trs
End Function
Function GetNo(textString)
If "0" <= Mid(textString, 1, 1) And Mid(textString, 1, 1) <= "9" And Mid(textString, 2, 1) = "-" Then
If "0" <= Mid(textString, 3, 1) And Mid(textString, 3, 1) <= "9" Then
If "0" <= Mid(textString, 4, 1) And Mid(textString, 4, 1) <= "9" Then
GetNo = Mid(textString, 1, 4)
Else
GetNo = Mid(textString, 1, 3)
End If
Else
GetNo = ""
End If
Else
GetNo = ""
End If
End Function
%>