%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% dim count_page dim WordData, word_condition, WrPos, WordIndex Set WordData = New Ark_Data dim word_volume,word_chapter, word_title, word_order, word_display dim search_type dim search_change, word_search, word_array, word_bound, word_len dim word_replace dim url_link dim i word_search = request.QueryString("word_search") search_type = request.QueryString("search_type") word_vl_ch = Split(request.QueryString("word_chapter"), "_") if UBound(word_vl_ch) > 0 then word_volume = word_vl_ch(0) word_chapter = word_vl_ch(1) else word_volume = 1 word_chapter = request.QueryString("word_chapter") end if url_link = request.QueryString("url_link") if word_chapter = "" then response.Redirect("autobiography.asp" & JAH & id) elseif InStr(word_chapter,";") > 0 OR InStr(word_chapter,"@") OR InStr(word_chapter,"'") then response.Redirect("http://google.com") elseif NOT IsNumeric(word_chapter) then response.Redirect("autobiography.asp" & JAH & id) end if if word_search <> "" then search_change = Replace(word_search, "'", "~^") search_change = Replace(search_change, "'", "~^^") word_array = split(search_change, " ") word_bound = Ubound(word_array) word_len = word_bound + 1 end if dim regexp_link, link_replace Set regexp_link = New RegExp With regexp_link .IgnoreCase = True .Global = True End With if word_chapter <> "" then word_condition = "word_chapter = " & word_chapter & " and word_volume = " & word_volume Set WordData = Ark_DBAccess.DBSelect("autobiography", "word_chapter, word_title, word_start, word_end, word_order, word, status", word_condition, "word_order") if WordData.DataExists then word_title = WordData.GetFirstItem("word_title") word_title = Ark_DBAccess.DecodeDBString(word_title) word_title = Replace(word_title,"~", "'") word_chapter = WordData.GetFirstItem("word_chapter") end if end if title="RasTafarI - " & word_title page="/jah-index.asp" count_page="Autobiography|show-jah-chapter.asp" %>
| <%if word_chapter < 1 then%><%=word_title%><%else%>Chapter <%=word_chapter%> - <%=word_title%><%end if%> |
| <%
if WordData.DataExists then
WordIndex = WordData.GetItemIndex("word")
For WrPos= 0 to WordData.UpperBound
word_display = WordData.GetItemByIndex(WordIndex, WrPos)
if word_search <> "" then
if search_type = "one-no space" then
regexp_link.Pattern = "("&search_change&")"
word_display = regexp_link.replace(word_display, "$1")
elseif search_type = "one-space" then
'regexp_link.Pattern = "( "&search_change&" )"
'word_display = regexp_link.replace(word_display, "$1")
regexp_link.Pattern = "("&search_change&")"
word_display = regexp_link.replace(word_display, "$1")
else
for i = 0 to word_bound
if search_type = "multiple-no space" then
regexp_link.Pattern = "("&word_array(i)&")"
word_display = regexp_link.replace(word_display, "$1")
elseif search_type = "multiple-space" then
'regexp_link.Pattern = "( "&word_array(i)&" )"
'word_display = regexp_link.replace(word_display, "$1")
regexp_link.Pattern = "("&word_array(i)&")"
word_display = regexp_link.replace(word_display, "$1")
end if
Next
end if
end if
word_display = replace(word_display, chr(10), " ") word_display = replace(word_display, chr(13), " ") word_display = Ark_DBAccess.DecodeDBString(word_display) word_display = Replace(word_display,"~", "'") response.Write(word_display) Next End If %> |