<%dim rstnews dim ipagesize dim ipagecurrent dim ipagecount dim irecordsshown dim i dim ctr %>
<% if Request.querystring("mode")="ans" then dim strselectans dim answer dim ques dim qlen dim alen dim detail,detail1,SubstringCount,suby,check,chk,detail2 Function GetSubstringCount(strToSearch, strToLookFor) GetSubstringCount = UBound(split(UCase(strToSearch),UCase(strToLookFor))) End Function if Request.Form("detail1") = "" then strselectans="Select answer,question from faq where id="&Request.QueryString("id") Dim rstans ' recordset variable set rstans=server.createobject("ADODB.Recordset") rstans.open strselectans,con,1,3 ques=replace(rstans("question"),"|1","'") ques=replace(ques,vbcrlf,"
") answer=replace(rstans("answer"),"|1","'") answer=replace(answer,vbcrlf,"
") detail2 = "QUES."&ques&"
" detail2 = detail2 & "ANS."&answer&"
" detail = mid(trim(detail2),1,600) SubstringCount = GetSubstringCount(detail,"
") suby=0 IF substringcount > 16 then suby =substringCount-16 end if check=suby*100 ' Response.Write(check) detail = mid(trim(replace(detail2,"|1","'")),1,600-check) chk=600-check chk=chk+1 detail1 = mid(trim(detail2),chk) rstans.close set rstans=nothing elseif Request.Form("detail1") <> "" then detail = mid(trim(replace(Request.Form ("detail1"),"|1","'")),1,600) SubstringCount = GetSubstringCount(detail, "
") IF substringcount > 15 then suby =substringCount-15 end if check=suby*100 detail = mid(trim(replace(Request.Form ("detail1"),"|1","'")),1,600-check) chk=600-check chk=chk+1 detail1 = mid(trim(Request.Form ("detail1")),chk) end if %> <% if len(detail1) > 0 then %> "> <%if Request.Form("times") = "2" then%> <%else%> <%end if%> <%end if%> <%if len(detail1) <= 0 then%> <%end if%> <%end if%> <% if Request.querystring("mode")="ques" then %> <% dim strselectques dim question strselectques="Select question,id from faq where sub_id="&Request.QueryString("sub_id") iPageSize = 5 ' records paging upto If Request.QueryString("page") = "" Then iPageCurrent = 1 Else iPageCurrent = CInt(Request.QueryString("page")) End If Dim rstques ' recordset variable set rstques=server.createobject("ADODB.Recordset") rstques.open strselectques,con,1,3 server.ScriptTimeout = 180 rstques.PageSize = iPageSize iPageCount = rstques.pageCount if iPageCount = 0 then %> <% else If iPageCurrent > iPageCount Then iPageCurrent = iPageCount end if If iPageCurrent < 1 Then iPageCurrent = 1 rstques.AbsolutePage = iPageCurrent %>
<% if rstques.PageCount > 0 then do while iRecordsShown < iPageSize And not rstques.eof question=replace(rstques("question"),"|1","'") question=replace(question,vbcrlf,"
") question=LEFT(question,100) %> <% ctr = ctr + 1 iRecordsShown = iRecordsShown + 1 rstques.MoveNext loop end if %> <% If iPageCurrent <> 1 Then %> <% ' Above spacing is inside the If so we don't get it unless needed End If If iPageCurrent < iPageCount Then %> <% End If %> <% rstques.Close() ' recordset close set rstques = nothing %> <% end if%> <% if Request.querystring("mode")="sub" then %> <% dim strselectsub strselectsub="Select sub_id ,description from sub_category where cat_id="&Request.QueryString("cat_id") 'Dim rstFaq ' recordset variable 'set rstFaq=server.createobject("ADODB.Recordset") 'stFaq.open strselect1 ,con,1,3 'r=rstFaq.RecordCount 'redim subrecords(ar) 'subrecords(0)=-1 'for j=1 to ar 'subrecords(j)=rstfaq("sub_id") 'rstFaq.MoveNext 'next 'rstFaq.Close 'set rstfaq=nothing iPageSize = 6 ' records paging upto If Request.QueryString("page") = "" Then iPageCurrent = 1 Else iPageCurrent = CInt(Request.QueryString("page")) End If Dim rstCat ' recordset variable set rstCat=server.createobject("ADODB.Recordset") rstCat.open strselectsub ,con,1,3 server.ScriptTimeout = 180 rstCat.PageSize = iPageSize iPageCount = rstCat.pageCount if iPageCount = 0 then %> <% else If iPageCurrent > iPageCount Then iPageCurrent = iPageCount end if If iPageCurrent < 1 Then iPageCurrent = 1 rstCat.AbsolutePage = iPageCurrent %>
<% if rstCat.PageCount > 0 then do while iRecordsShown < iPageSize And not rstCat.eof%> <% ctr = ctr + 1 iRecordsShown = iRecordsShown + 1 rstCat.MoveNext loop end if %> <% If iPageCurrent <> 1 Then %> <% ' Above spacing is inside the If so we don't get it unless needed End If If iPageCurrent < iPageCount Then %> <% End If rstCat.Close() ' recordset close set rstCat = nothing %> <% end if%> <%if Request.querystring("mode")="cat" then %> <% dim strselect if request.queryString("Check")="ALL" or request.form("Check")="ALL" then strselect="Select * from category" elseif request.queryString("Check")="category" then strselect="select * from category where description like '%"&replace(Request.querystring("srchstring"),"'","|1")&"%'" elseif request.queryString("Check")="key" then strselect="select description,cat_id from category where cat_id in (select distinct(cat_id) from sub_category where sub_id in(select sub_id from faq where question like '%"&replace(Request.querystring("srchstring"),"'","|1")&"%' or answer like '%"&replace(Request.querystring("srchstring"),"'","|1")&"%'))" 'Dim rstFaq ' recordset variable 'set rstFaq=server.createobject("ADODB.Recordset") 'stFaq.open strselect1 ,con,1,3 'r=rstFaq.RecordCount 'redim subrecords(ar) 'subrecords(0)=-1 'for j=1 to ar 'subrecords(j)=rstfaq("sub_id") 'rstFaq.MoveNext 'next 'rstFaq.Close 'set rstfaq=nothing end if iPageSize = 6 ' records paging upto If Request.QueryString("page") = "" Then iPageCurrent = 1 Else iPageCurrent = CInt(Request.QueryString("page")) End If Dim rstCat1 ' recordset variable set rstCat1=server.createobject("ADODB.Recordset") rstCat1.open strselect ,con,1,3 server.ScriptTimeout = 180 rstCat1.PageSize = iPageSize iPageCount = rstCat1.pageCount if iPageCount = 0 then %> <% else If iPageCurrent > iPageCount Then iPageCurrent = iPageCount end if If iPageCurrent < 1 Then iPageCurrent = 1 rstCat1.AbsolutePage = iPageCurrent %> <% if rstCat1.PageCount > 0 then %>
<% do while iRecordsShown < iPageSize And not rstCat1.eof%> <% ctr = ctr + 1 iRecordsShown = iRecordsShown + 1 rstCat1.MoveNext loop end if %> <% If iPageCurrent <> 1 Then %> <% ' Above spacing is inside the If so we don't get it unless needed End If If iPageCurrent < iPageCount Then %> <% End If rstCat1.Close() ' recordset close set rstCat1 = nothing %> <%end if%>
Search for : Enter Search String :
<%=replace(detail,"|2","""")%>
Back..
Back..
No Records Found
Page No. <% for i =1 to rstques.PageCount%> "> <%=i%> <% next%> <% end if%>
"> Ques. <%=question%>
"> Prev"> Next
"> Please send your Queries
No Records Found
Page No. <% for i =1 to rstCat.PageCount%> "> <%=i%> <% next%> <% end if%>
  • "><%=replace(rstCat("description"),"|1","'")%>
  • "> Prev"> Next
    No Records Found
    Page No. <% for i =1 to rstCat1.PageCount%> &check=<%=request.querystring("check")%>"> <%=i%> <% next%> <% end if%>
    Select the Category to view the FAQs.
  • "><%=replace(rstCat1("description"),"|1","'")%>
  • &check=<%=request.querystring("check")%>">Prev&check=<%=request.querystring("check")%>">Next