<!--#include file="conn.asp"-->
<!--#include file="inc/function.asp"-->
<%
'快问知道
Dim AskD,inHtml
Set AskD = Server.CreateObject("KwAsk.FunAsk")
	opendb
	set AskD.myConn =conn
	AskD.myPredb =predb
	AskD.Getsetting()
	AskD.GetTemplate("T-class.html")
	siteinfo=AskD.siteinfo
	setting=AskD.setting
    inHtml=RexHtml(AskD.tempbody)
    inHtml=RexHtml_IF(inHtml)
     set AskD.myConn =Nothing
	 closedb
Set AskD = Nothing
Response.Write(inHtml)

Function classList()
  Dim rs,sql,i,rs1,sql1,p,str
  set rs = Server.CreateObject("Adodb.recordset")
	sql="select * from "&predb&"Class where esNum=0 order by esPai ASC"
	rs.open sql,conn,0,1
	do while not rs.eof
	
	str=str&"<div class=""classm3"">"&vbcrlf
	str=str&"<div class=""big""><a href="""
    IF setting(34)=0 Then
	str=str&"List.asp?classid="&rs("CLassID")
	Else
	str=str&siteInfo(1)&"List-"&rs("CLassID")&".html"
	End IF
	str=str&""">"&rs("classname")&"</a></div>"&vbcrlf
	str=str&"<div class=""small"">"&vbcrlf
	str=str&"<ul>"&vbcrlf

set rs1=conn.execute("select * from "&predb&"Class where esNum="&rs("CLassID")&" order by esPai ASC")
p=0
        do while not rs1.eof
	str=str&"<li><a href="""
    IF setting(34)=0 Then
	str=str&"List.asp?classid="&rs1("CLassID")
	Else
	str=str&siteInfo(1)&"List-"&rs1("CLassID")&".html"
	End IF
	str=str&""">"&rs1("ClassName")&"</a></li>"&vbcrlf
		rs1.movenext
		loop 
	rs1.close
	set rs1=nothing
	
	str=str&"<li><a href="""
    IF setting(34)=0 Then
	str=str&"List.asp?classid="&rs("CLassID")
	Else
	str=str&siteInfo(1)&"List-"&rs("CLassID")&".html"
	End IF
	str=str&""">&raquo;</a></li>"&vbcrlf
	str=str&"</ul>"&vbcrlf
	str=str&"</div>"&vbcrlf
	str=str&"</div>"&vbcrlf
rs.movenext
loop
rs.close
set rs=nothing
classList=str
End Function
%>