<%
'(C) Copyright 2003 by i-Freelancer.Net, Inc.
%>

<!-- #INCLUDE FILE="RainbowCartBaseForm.asp" -->
<%
InitBaseForm "FAQ"
Sub Page_Load
  dim rs
  openrs rs, "select distinct Class from faq where online=true order by Class asc "
  if rs.eof then
    set rs = nothing
    SetVar "DListShowFAQ", ""
    Parse "ShowFAQNoRecords", False
    Parse "FormShowFAQ", False
	exit sub
  end if
  iRecordsPerPage = 100
'Εγ₯ά€jΓώ
  while not rs.EOF
  iCounter = 1
	sClass = GetValue(rs, "Class")
	SetVar "ShowFAQClass", sClass

	iCounter=1
	openrs rs1, "select * from faq where online=true and Class=" & ToSQL(sClass,"Text") & " order by addtime asc "
	while not rs1.EOF
		SetVar "ShowFAQiCounter" , iCounter	
		SetVar "ShowFAQQuery" , GetValue(rs1, "Query")
		SetVar "ShowFAQAnswer" , GetValue(rs1, "Answer")
		Parse "DListShowFAQ", True
		rs1.MoveNext
	    iCounter = iCounter + 1
	wend

	Parse "DListShowBigFAQ", True
	SetVar "DListShowFAQ",""
    rs.MoveNext
  wend
  set rs = nothing
  SetVar "ShowFAQNoRecords", ""
  Parse "FormShowFAQ", False
End Sub

sub Page_PreRender
      cn.Close
      Set cn = Nothing
end sub
%>