%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% dim count_page dim WordData, word_condition, WrPos, WordIndex Set WordData = New Ark_Data dim word_id, word_title, word_date, word_number, 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_id = request.QueryString("word_id") url_link = request.QueryString("url_link") if word_id = "" then response.Redirect("kebra-negast.asp" & JAH & id) elseif InStr(word_id,";") > 0 OR InStr(word_id,"@") OR InStr(word_id,"'") then response.Redirect("http://google.com") 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_id <> "" then word_condition = qf("word_id = 'word_id'") Set WordData = Ark_DBAccess.DBSelect("kebra_negast", "word_title, word_date, word_order, word, word_id", word_condition, "word_order") if WordData.DataExists then word_title = WordData.GetFirstItem("word_title") word_title = Replace(word_title, "~", "'") word_date = WordData.GetFirstItem("word_date") word_number = Replace(WordData.GetFirstItem("word_id"), "ch", "") end if end if title="Kebre Negast - " & word_title page="/jah-index.asp" count_page="Kebra Negast|kebra-negast.cfm" %>
| <%response.Write(replace(word_title, "~", "'"))%> |
| <%response.Write(FormatDateTime(word_date, 1))%> |
| <%
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")
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")
end if
Next
end if
end if
word_display = replace(word_display, chr(10), " ") word_display = replace(word_display, chr(13), " ") word_display = Replace(word_display, "~", "'") response.Write(word_display) Next End If %> |
| Chapter 1 | <%else%> <%if word_number > 1 then prev_number = word_number - 1 if InStr(word_id, "ch00") > 0 then display_chapter = "ch00"&prev_number elseif InStr(word_id, "ch0") > 0 then display_chapter = "ch0"&prev_number else display_chapter = "ch"&prev_number end if %>Chapter <%=prev_number%> | <% end if if word_number < 117 then next_number = word_number + 1 if InStr(word_id, "ch00") > 0 then display_chapter = "ch00"&next_number elseif InStr(word_id, "ch0") > 0 then display_chapter = "ch0"&next_number else display_chapter = "ch"&next_number end if %>Chapter <%=next_number%> | <% end if end if %>