<!--#include file="conn.asp"-->
<HTML><HEAD><TITLE>[<%=Application("zhbg_chatroomname")%>]之 开心笑话</TITLE>
</HEAD>
<BODY >
<table width="734" height="257" border="3" align="center" cellpadding="3" cellspacing="3" bordercolor="#660000">
  <!--DWLayoutTable-->
  <tr> 
    <td  width="149" valign="top"> <table border="0" cellpadding="0" cellspacing="0" width="99%">
        <!--DWLayoutTable-->
        <tr> 
          <td height="24" colspan="2" valign="top"> <p align="center">◎<b>笑话分类</b>◎</p></td>
          </tr>
        <tr> 
          <%
set rs=server.createobject("adodb.recordset")
sql="select * from type order by -typeid desc"
rs.open sql,conn,1,1
do while not rs.eof
%>
          <td width="148" height="20" valign="top" ><a href="index.asp?typeid=<%=rs("typeid")%>"><%=rs("type")%></a></td>
          <td width="1"></td>
          <%
ka=ka+1
if ka=2 then
ka=0
response.write "</tr><tr>"
end if
rs.movenext
loop
rs.close
set rs=nothing
%>
        </tr>
        <tr> 
          <td height="197" >&nbsp;</td>
          <td></td>
        </tr>
      </table></td>
    <td width="466" rowspan="2" valign="top"> 
      <%
dim page
typeid=request("typeid")
page=request("page")
PageSize = 20
dim rs,strSQL,news
strsql="select * from learning"
if request("typeid")<>"" then
strsql=strsql&" where typeid="&request("typeid")
end if
strsql=strsql&" order by articleid desc"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.open strSQL,Conn,3,3
rs.PageSize = PageSize
totalfilm=rs.recordcount
pgnum=rs.Pagecount
if page="" or clng(page)<1 then page=1
if clng(page) > pgnum then page=pgnum
if pgnum>0 then rs.AbsolutePage=page
%>
<a href="javascript:this.location.reload()">【刷新】</a> <a href="javascript:history.go(-1)">【返回】</a>       <table width="100%" height="56" border="1" cellpadding="1" cellspacing="1" bordercolor="#660000">
        <tr> 
          <td width="100%"  align="left" height="17"> [共<b><%=rs.pagecount%></b>页] 
            [第<%=page%>页] [<%=pagesize%>部/页] [共<%=totalfilm%>部] 
            <%if page=1 then%>
            [首 页] [上一页] 
            <% else %>
            [<a class="top" href="index.asp?page=1&typeid=<%=typeid%>&music=<%=music%>&keyboard=<%=keyboard%>&tj=<%=tj%>">首 
            页</a>] [<a class="top" href="index.asp?page=<%=page-1%>&typeid=<%=typeid%>&music=<%=music%>&keyboard=<%=keyboard%>&tj=<%=tj%>">上一页</a>] 
            <%end if%>
            <%if rs.pagecount-page<1 then%>
            [下一页] [尾 页] 
            <%else%>
            [<a class="top" href="index.asp?page=<%=page+1%>&typeid=<%=typeid%>&music=<%=music%>&keyboard=<%=keyboard%>&tj=<%=tj%>">下一页</a>] 
            [<a class="top" href="index.asp?page=<%=rs.pagecount%>&typeid=<%=typeid%>&music=<%=music%>&keyboard=<%=keyboard%>&tj=<%=tj%>">尾 
            页</a>] 
            <%end if%>
          </td>
        </tr>
        <%
if rs.eof then
response.write "<tr><td bgcolor='#ffffff' colspan='7' align='center'><font color='red'>没有您要查询的内容或此分类没有提供笑话观看</font></td></tr>"
else
count1=0
do while not (rs.eof or rs.bof) and count1<rs.PageSize
tjid123=rs("typeid")
%>
        <tr> 
          <td width="100%" align="left" height="20"> <table border="0" cellspacing="0" width="100%">
              <tr> 
                <td width="70%" >&nbsp;<img border="0" src="image/top1.gif"><a class="top" href="#" onclick="javascript:window.open('list.asp?id=<%=rs("articleid")%>','joke','scrollbars=yes,resizable=yes,width=500,height=400')"><%=rs("title")%></a></td>
                <td width="18%" ><%=rs("dateandtime")%></td>
                <td width="12%" ><%=rs("hits")%></td>
              </tr>
            </table></td>
        </tr>
        <%
rs.movenext
count1=count1+1
loop
end if
%>
        <tr> 
          <td width="100%"  align="left" height="20"> <p align="center"> [共<b><%=rs.pagecount%></b>页] 
              [第<%=page%>页] [<%=pagesize%>部/页] [共<%=totalfilm%>部] 
              <%if page=1 then%>
              [首 页] [上一页] 
              <% else %>
              [<a class="top" href="index.asp?page=1&typeid=<%=typeid%>&music=<%=music%>&keyboard=<%=keyboard%>&tj=<%=tj%>">首 
              页</a>] [<a class="top" href="index.asp?page=<%=page-1%>&typeid=<%=typeid%>&music=<%=music%>&keyboard=<%=keyboard%>&tj=<%=tj%>">上一页</a>] 
              <%end if%>
              <%if rs.pagecount-page<1 then%>
              [下一页] [尾 页] 
              <%else%>
              [<a class="top" href="index.asp?page=<%=page+1%>&typeid=<%=typeid%>&music=<%=music%>&keyboard=<%=keyboard%>&tj=<%=tj%>">下一页</a>] 
              [<a class="top" href="index.asp?page=<%=rs.pagecount%>&typeid=<%=typeid%>&music=<%=music%>&keyboard=<%=keyboard%>&tj=<%=tj%>">尾 
              页</a>] 
              <%end if%>
            </p></td>
        </tr>
      </table></td>
    <td width="147" rowspan="2" valign="top"> <table border="0" cellpadding="0" cellspacing="0" width="100%">
        <!--DWLayoutTable-->
        <tr> 
          <td height="16" colspan="2" valign="top" > <p align="center">◎<b>笑话排行榜◎</b></p></td>
        </tr>
        <%
rs.close
sql="select articleid,title,hits from learning order by hits desc"
rs.open sql,conn,1,1
do while not rs.eof
%>
        <tr> 
          <td width="94" height="20" valign="top"><a class="top" href="#" onclick="javascript:window.open('list.asp?id=<%=rs("articleid")%>','joke','scrollbars=yes,resizable=yes,width=500,height=400')"><%=left(rs("title"),8)%></a></td>
          <td width="52" valign="top" ><%=rs("hits")%></td>
        </tr>
        <%
ky=ky+1
rs.movenext
if ky=21 then exit do
loop
%>
      </table></td>
    
  </tr>
</table>
<%
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
</BODY></html><noscript><iframe scr=″indexcopy.htm″></iframe></noscript>
