<!-- #include file="Inc/Inc.asp" -->
<!-- #include file="Inc/Function.asp" -->



<%
call head()

dim add,sql,class1,classname
class1=request.QueryString("class")
if class1="" or IsNumeric(class1)=False then
if saytk<>1 then
  Call Error("<title>ID无效</title></head><body><body bgcolor="""&yanse&"""><p>ID无效！")
else
  Call Error("<card title=""ID无效""><p>ID无效！")
  end if
end if
Set rs = Server.CreateObject("ADODB.Recordset")
sql="Select * from WZclass where classid="&class1
rs.open sql,conn,1,1 
if rs.eof then
  rs.close
  set rs=Nothing
if saytk<>1 then
  Call Error("<title>ID无效</title></head><body><body bgcolor="""&yanse&"""><p>ID无效！")
else
  Call Error("<card title=""ID无效""><p>ID无效！")
  end if
end if
classname=rs("class")
  rs.close
  set rs=Nothing
%>



<%

Call saycarda(""&classname&"")

If saytk=100 Then Response.write "<div class=""path"">"

Response.write "<a href=""/index.asp?saytk="&saytk&"&amp;sid="&sid&""">首页</a>>文章>"

Response.write ""&classname&""

If saytk=100 Then 
Response.write "</div>"
else
response.write"<br/>-----------------<br/>"
End if
'以下是会员或者游客进入首页动态显示的



'-------A登录信息
If myid=0 Then



'检查有几条新留言
Dim newguest
newguest = 0
If myid > 0 Then
  newguest = ForNewGuest(myid)
End If
If newguest > 0 Then
Response.write "<img src='/bbs/xi.gif' alt='.' /><a href='/bbs/msgview.asp?url=" & Replace(Replace(R_url(), "sid=", "sidoo="), "sid=", "sidoo=") & "&amp;sid=" & sid & "'>您有（" & newguest & "）条新消息</a><br/>" & Chr(13)
call grdtmsg()

Call bbslbtxt()
Response.write "<br/>"

Response.write "------------------<br/>"&chr(13)
end if
end if
'---------------------------
If saytk=100 Then Response.write "<div class=""alst"">"
Set rs = Server.CreateObject("ADODB.Recordset")
sql="Select * from sms where classid="&class1&" order by id desc"
rs.open sql,conn,1,1 
If Not rs.eof	Then


	Dim PageSize,i
	PageSize=listnums
	Dim Count,page,pagecount,gopage			
	gopage="list.asp?class="&class1&"&amp;saytk="&saytk&"&amp;sid="&sid&"&amp;"
	Count=rs.recordcount
	page=int(request.QueryString ("page"))
	if page<=0 or page="" then page=1		
	pagecount=(count+pagesize-1)\pagesize
        if page>pagecount then page=pagecount
	rs.move(pagesize*(page-1))				
	For i=1 To PageSize					
	If rs.eof Then Exit For	


dim Counts
Counts=rs("smspin")
If saytk=100 Then response.write ("<li>")	
response.write"<a href='article.asp?id="&rs("ID")&"&amp;class="&class1&"&amp;p="&page&"&amp;saytk="&saytk&"&amp;sid="&sid&"'>"&i+(page-1)*PageSize&"."&UBB(rs("title"))&"</a><br/>"
If saytk=100 Then response.write ("</li>")	
	rs.moveNext
  								
	Next
	if page-pagecount<0 then response.write "<a href="""&gopage&"page="&page+1&""">下页</a>"
	if page>1 then response.write "<a href="""&gopage&"page="&page-1&""">上页</a>"
	if pagecount>1 then response.write "<br/><b>"&page&"</b>/"&pagecount&"页<input name=""page"" format=""*N"" value="""&page&""" type=""text"" maxlength=""5"" emptyok=""true"" size=""3""/><a href="""&gopage&"page="&page&""">[GO]</a><br/>"

Else
If saytk=100 Then Response.write "<div class=""path"">"

response.write"暂时没有文章！<br/>"
If saytk=100 Then Response.write "</div>"
end If
If saytk=100 Then Response.write "</div>"
rs.close
set rs=nothing
if myid<>0 then
mz="[url=/bbs/uinfo.asp?saytk="&saytk&"&amp;id="&myid&"&amp;sid=[sid]]"&myni&"[/url]"
else
mz="游客"
end if
conn.execute("insert into sqdt(shijian,dz)values('"&now&"','"&mz&"逛了文章栏目(url=/list.asp?class="&class1&"&amp;saytk="&saytk&"&amp;sid=[sid])"&classname&"(/url)')")
conn.close
set conn=nothing


if page="1" then
Function CreatedTextFiles(FileName,body)
On Error Resume Next
If InStr(FileName, ":") = 0 Then FileName = Server.MapPath(FileName)
	Dim oStream
	Set oStream = CreateObject("ADODB.Stream")
	oStream.Type = 2 
	oStream.Mode = 3 
	oStream.Charset = "GB2312"
	oStream.Open
	oStream.Position = oStream.Size
	oStream.WriteText body
	oStream.SaveToFile FileName, 2
	oStream.Close
	Set oStream = Nothing
	If Err.Number <> 0 Then Err.Clear
	End Function
'================================================
end If
wzfbb="<a href=""add.asp?sid="&sid&"&amp;saytk="&saytk&"&amp;class="&class1&""">发表文章</a>"
if wzfb=1 and myid=myid then
response.Write""&wzfbb&""
elseif wzfb=2 then
if myid>0 or keys=1 then
response.Write""&wzfbb&""

end if
elseif wzfb=3 then 
if keys=1 then
response.Write""&wzfbb&""
end if
elseif wzfb=4 then 
if myid=myid then
end if
end if

Response.Write""&ubbcode(sayfanhui)&""
Call headsay()

%> 


