<!--#include file="../Inc/conn.asp"-->
<!--#Include File="Func.asp"-->
<?xml version="1.0" encoding="gb2312"?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><%=unicode(""&SiteTitle&"")%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"/>
<link href="<%if Session("CssFile")<>"" then%><%=Session("CssFile")%><%else%>Style.css<%end if%>" rel="stylesheet" type="text/css">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<%dim rs,sql,idCount,Listid,classid
Listid=request("Listid")
classid=Trim(request.QueryString("classid"))

if not IsNumeric(Listid) then 
response.Write("&#x8BF7;&#x4E0D;&#x8981;&#x8F93;&#x5165;&#x975E;&#x6CD5;&#x5B57;&#x7B26;")
response.end
end if
dim pages,sqlid
      pages=8
  dim pagec
  dim page
      page=clng(request("Page"))
  dim pagenc
      pagenc=5
  dim pagenmax
  dim pagenmin
  dim pageprevious
  dim pagenext
  dim datawhere
If Trim(classid)<>"" Then 
	  datawhere=" where yn = 0 and ClassID="&classid&" "
Else 
	  datawhere=" where yn = 0 "
End If 
  dim Myself,PATH_INFO,QUERY_STRING
      PATH_INFO = request.servervariables("PATH_INFO")
	  QUERY_STRING = request.ServerVariables("QUERY_STRING")'
      if QUERY_STRING = "" then
	    Myself = PATH_INFO & "?"
	  elseif Instr(PATH_INFO & "?" & QUERY_STRING,"Page=")=0 then
	    Myself= PATH_INFO & "?" & QUERY_STRING & "&"
	  else
	    Myself = Left(PATH_INFO & "?" & QUERY_STRING,Instr(PATH_INFO & "?" & QUERY_STRING,"Page=")-1)
	  end if
  dim taxis
      taxis="order by id desc "
  dim i
  if Listid="" then
  sql="select count(ID) as idCount from "&tbname&"_Article" & datawhere
  set rs=server.createobject("adodb.recordset")
  rs.open sql,conn,0,1
  idCount=rs("idCount")
  if(idcount>0) then
    if(idcount mod pages=0)then
	  pagec=int(idcount/pages)
   	else
      pagec=int(idcount/pages)+1
    end if
	sql="select id from "&tbname&"_Article " & datawhere&taxis
    set rs=server.createobject("adodb.recordset")
    rs.open sql,conn,1,1
    rs.pagesize = pages
    if page < 1 then page = 1
    if page > pagec then page = pagec
    if pagec > 0 then rs.absolutepage = page
    for i=1 to rs.pagesize
	  if rs.eof then exit for
	  if(i=1)then
	    sqlid=rs("id")
	  else
	    sqlid=sqlid &","&rs("id")
	  end if
	  rs.movenext
    next
  end if
Response.Write("<h2>&#x65B0;&#x95FB;&#x54A8;&#x8BAF;</h2><ul><li>&#x603B;&#x6570;:"&idcount&";"&page&"/"&pagec&" ")
pagenmin=page-pagenc
  pagenmax=page+pagenc
  if(pagenmin<1) then pagenmin=1
  if(page>1) then response.write ("<a href="""& myself &"Page=1"" title=""&#x56DE;&#x5230;&#x7B2C;&#x4E00;&#x9875;""><font face=""webdings"" color=""#000000"">9</font></a> ")
  if page-(pagenc*2+1)<=0 then
	pageprevious=1
  else
	pageprevious=page-(pagenc*2+1)
  end If
  if(pagenmin>1) then response.write ("<a href="""& myself &"Page="& pageprevious &""" title=""&#x7B2C;"& pageprevious &"&#x9875;""><font face=""webdings"" color=""#000000"">3</font></a> ")
  if(pagenmax>pagec) then pagenmax=pagec
  for i = pagenmin to pagenmax
	if(i=page) then
	  response.write ("&nbsp;<strong style=""color:red"">"& i &"</strong>&nbsp;")
	Else
		response.write ("[<a href="""& myself &"Page="&i&""">"& i &"</a>]")
	end if
  next
  if page+(pagenc*2+1)>=pagec then
    pagenext=pagec
  else
    pagenext=page+(pagenc*2+1)
  end If
  response.Write("<br>")
set rs = server.createobject("adodb.recordset")
sql="select * from "&tbname&"_Article where yn = 0 and id in("& sqlid &") order by ID"
rs.open sql,conn,1,3
dim nn
nn=1
do while not rs.eof
response.Write("["&nn&"]<a title="""&unicode(rs("Title"))&""" href=""NewsView.asp?Id="&rs("ID")&""">"&unicode(rs("Title"))&"</a>")
response.Write("</br>")
nn=nn+1
rs.movenext 
loop
rs.close
response.Write("<br/></li></ul><div id=""n"" align=""left""></div><img src=""WapImg/checkarticle.gif"" alt="""" /><a title=""&#x8D44;&#x8BAF;&#x641C;&#x7D22;"" href=""NewsFindText.asp"">&#x8D44;&#x8BAF;&#x641C;&#x7D22;</a><br/><img src=""WapImg/back.gif"" alt="""" /><a title=""&#x8FD4;&#x56DE;&#x4E0A;&#x7EA7;"" href=""index.asp"">&#x8FD4;&#x56DE;&#x4E0A;&#x7EA7;</a><br/><img src=""WapImg/home.gif"" alt="""" /><a title=""&#x7F51;&#x7AD9;&#x9996;&#x9875;"" href=""Index.asp"">&#x7F51;&#x7AD9;&#x9996;&#x9875;</a>")
else

 sql="select count(ID) as idCount from "&tbname&"_Article where yn = 0 and id="&Listid&""
  set rs=server.createobject("adodb.recordset")
  rs.open sql,conn,0,1
  idCount=rs("idCount")
  if(idcount>0) then
    if(idcount mod pages=0)then
	  pagec=int(idcount/pages)
   	else
      pagec=int(idcount/pages)+1
    end if
	sql="select id from "&tbname&"_Article where where yn = 0 and id="&Listid&" order by ID"
    set rs=server.createobject("adodb.recordset")
    rs.open sql,conn,1,1
    rs.pagesize = pages
    if page < 1 then page = 1
    if page > pagec then page = pagec
    if pagec > 0 then rs.absolutepage = page
    for i=1 to rs.pagesize
	  if rs.eof then exit for
	  if(i=1)then
	    sqlid=rs("id")
	  else
	    sqlid=sqlid &","&rs("id")
	  end if
	  rs.movenext
    next
  end If
Response.Write("<h2>"&getclassname(Listid)&"</h2><ul><li>&#x603B;&#x6570;:"&idcount&";"&page&"/"&pagec&" ")
pagenmin=page-pagenc
  pagenmax=page+pagenc
  if(pagenmin<1) then pagenmin=1
  if(page>1) then response.write ("<a href="""& myself &"Page=1"" title=""&#x56DE;&#x5230;&#x7B2C;&#x4E00;&#x9875;""><font face=""webdings"" color=""#000000"">9</font></a> ")
  if page-(pagenc*2+1)<=0 then
	pageprevious=1
  else
	pageprevious=page-(pagenc*2+1)
  end If
  if(pagenmin>1) then response.write ("<a href="""& myself &"Page="& pageprevious &""" title=""&#x7B2C;"& pageprevious &"&#x9875;""><font face=""webdings"" color=""#000000"">3</font></a> ")
  if(pagenmax>pagec) then pagenmax=pagec
  for i = pagenmin to pagenmax
	if(i=page) then
	  response.write ("&nbsp;<strong style=""color:red"">"& i &"</strong>&nbsp;")
	Else
		response.write ("[<a href="""& myself &"Page="&i&""">"& i &"</a>]")
	end if
  next
  if page+(pagenc*2+1)>=pagec then
    pagenext=pagec
  else
    pagenext=page+(pagenc*2+1)
  end If
  response.Write("<br>")
set rs = server.createobject("adodb.recordset")
sql="select * from "&tbname&"_Article where yn = 0 and id="&Listid&" order by ID"
rs.open sql,conn,1,3
dim nna
nna=1
do while not rs.eof
response.Write("["&nna&"]<a title="""&unicode(rs("Title"))&""" href=""NewsView.asp?Id="&rs("ID")&""">"&unicode(rs("Title"))&"</a>")
response.Write("</br>")
nna=nna+1
rs.movenext 
loop
rs.close

response.Write("<br/></li></ul><div id=""n"" align=""left""></div><img src=""WapImg/checkarticle.gif"" alt="""" /><a title=""&#x8D44;&#x8BAF;&#x641C;&#x7D22;"" href=""NewsFindText.asp"">&#x8D44;&#x8BAF;&#x641C;&#x7D22;</a><br/><img src=""WapImg/back.gif"" alt="""" /><a title=""&#x8FD4;&#x56DE;&#x4E0A;&#x7EA7;"" href=""index.asp"">&#x8FD4;&#x56DE;&#x4E0A;&#x7EA7;</a><br/><img src=""WapImg/home.gif"" alt="""" /><a title=""&#x7F51;&#x7AD9;&#x9996;&#x9875;"" href=""Index.asp"">&#x7F51;&#x7AD9;&#x9996;&#x9875;</a>")
end if
%><br/>
<div id="b" align="left"></div>
<p>&copy;&#x32;&#x30;&#x31;&#x33; <%=unicode(ComName)%>&#x0020;&#x7248;&#x6743;&#x6240;&#x6709;
  <br/>
&#x73B0;&#x5728;&#x65F6;&#x523B; <%=now()%>
</p>
</body></html>