<%Option Explicit%> <% DIM QPg DIM QAll DIM QThx DIM QCat DIM strSql DIM Rs DIM strFAQArray DIM bFAQ DIM nFAQ DIM I DIM QRecords DIM nTotalRecords DIM nRecordsPerPage DIM nCurrentPage DIM nPageSetSize 'this variable stores the value which indicates the no of pages to be shown on the web page DIM nStartRec DIM nEndRec DIM tdcontentCSS DIM tablebgcolorCSS DIM tdheaderCSS DIM strCategory DIM bCategory DIM nCategory Init Sub Init tdcontentCSS = "contenttext" tdheaderCSS = "tdheader" tablebgcolorCSS ="tablebgcolor" If QRecords="" Then QRecords="5" QThx=Request.QueryString("thx") QAll=Trim(Request.QueryString("all")) QCat=Trim(Request.QueryString("cat")) QPg=Request.QueryString("pg") Connect Set Rs=Server.CreateObject("ADODB.RecordSet") GetDBData Set Rs=Nothing Disconnect End Sub Sub GetDBData strSql="Select id,title from testimonials_master where id<>0 order by title" strSql=strSql & vbnewline strSQl=strSql & "Select id,testimonials_cat_id,(select title from testimonials_master where id = testimonials_cat_id) testimonialcat,audit_data,(select name from users where id = t.user_id) username,post_datetime from Testimonials t where convert(varchar(8000),audit_data) <> '' and id<>0 and status = 1 " 'Response.Write strSQl 'Response.End IF QCat<>"" Then strSQl=strSql & " and testimonials_cat_id=" & QCat End If strSQl=strSql & " order by post_datetime desc" 'Response.write(strsql) 'Response.End Rs.Open strSql, Con If NOT (ISNULL(Rs) Or (Rs.EOF AND Rs.BOF)) Then strCategory=Rs.GetRows() bCategory=True nCategory=Ubound(strCategory,2) Else bCategory=False nCategory=-1 End IF Set Rs=Rs.NextRecordset If NOT (ISNULL(Rs) Or (Rs.EOF AND Rs.BOF)) Then strFAQArray=Rs.GetRows() bFAQ=True nFAQ=Ubound(strFAQArray,2) Else bFAQ=False nFAQ=-1 End IF Rs.Close End Sub Sub SetPageAttributes nTotalRecords=nFAQ +1 nRecordsPerPage=QRecords'=10 nPageSetSize=10 nCurrentPage=QPg IF QAll="y" then nRecordsPerPage=nTotalRecords If nCurrentPage="" Then nCurrentPage=1 nStartRec= (CLng(nCurrentPage) * CLNg(nRecordsPerPage)) - CLNg(nRecordsPerPage) If CLng(nStartRec)<1 Then nStartRec=0 nEndRec=CLng(nCurrentPage) * nRecordsPerPage -1 ' the value 5 indiactes that we want 5 records on each page eg if page no is 2 then the records picked up would be 2*5=10 to 2*5-5 ie from 6 to 10 If CLng(nEndRec)=> CLng(nTotalRecords) Then nEndRec=CLNG(nTotalRecords) -1 End If End sub Function DisplaySearchResults dIM strPageUrl,strText SetPageAttributes strText="" IF bFAQ=False Then strText="" strText=strText + "" strText=strText + "
" strText=strText + "
No Records Available

" Else For I=nStartRec To nEndRec strText=strText + "" strText=strText + "" strText=strText + "" strText=strText + "" strText=strText + "" strText=strText + "" strText=strText + "" strText=strText + "
" strText=strText + "
Posted By: " & strFAQArray(4,i) & "
" 'strText=strText + "Posted Date: " & strFAQArray(5,i) & "
" strText=strText + "Category: " & strFAQArray(2,i) & "
" 'strText=strText + "Date Posted :" & formatdatetime(strFAQArray(5,i),2) & "
" strText=strText + "
" strText=strText + "
" & strFAQArray(3,i) & "


" Next End If Response.Write strText 'DisplaySearchResults=strText End Function %> Cancer | breast cancer | breast cancer detection | early breast cancer detection | breast cancer prevention treatment
 
Connection Between the Environment and Breast Cancer
<%'DrawmenuTOP("")%>




<% If CStr(QCat)="" Then Response.Write("     All") Else Response.Write("     All") End If ' For i=0 TO nCategory ' IF CStr(QCat)= CStr(strCategory(0,i)) Then ' Response.Write("   " & strCategory(1,i) & "") ' Else ' Response.Write("   " & strCategory(1,i) & "") ' End If ' Next %>
<%DisplaySearchResults%> <% if CLng(nTotalRecords) > CLng(QRecords) then%> <%end if%>
<%Call DisplayPaging (nTotalRecords,nRecordsPerPage,nCurrentPage,nPageSetSize,QAll,"*","*","testimonials.asp?cat=" & QCat & "&pg=")%>