<!--#include file="conn.asp"-->
<%if not session("isadmin")="yes" then
response.redirect "login.asp"
end if

action = request.querystring("action")
if action = "logout" then
session.Abandon()
conn.close
set conn = nothing
response.redirect "index.asp"
end if
%>

<HTML><HEAD><TITLE>笑话管理</TITLE>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<meta http-equiv="Refresh" content="720; url=admin.asp"> 
<STYLE type=text/css>BODY {
	COLOR: #000000; FONT-SIZE: 12px
}
TD {
	COLOR: #000000; FONT-SIZE: 12px
}
TH {
	COLOR: #40BDE8; FONT-SIZE: 12px
}
.p1 {
	COLOR: #40BDE8; FONT-SIZE: 12px
}
.p2 {
	FONT-SIZE: 12px; LINE-HEIGHT: 140%
}
.p3 {
	FONT-SIZE: 14px
}
.p4 {
	FONT-SIZE: 14px; LINE-HEIGHT: 130%
}
.p5 {
	FONT-SIZE: 7px
}
.p6 {
	COLOR: #d0571f
}
.p7 {
	COLOR: #e54f3c
}
.pl {
	LINE-HEIGHT: 300%
}
.dm1 {
	BACKGROUND-COLOR: #ffcc00
}
.dm2 {
	BACKGROUND-COLOR: #ffcbc6
}
.dm3 {
	BACKGROUND-COLOR: #e54f3c
}
.dm4 {
	BACKGROUND-COLOR: #fdc8c1
}
.ds1 {
	BACKGROUND-COLOR: #b4362a; COLOR: #ffffff
}
.ds2 {
	BACKGROUND-COLOR: #ce4636; COLOR: #ffffff
}
.ds3 {
	BACKGROUND-COLOR: #fff5f4
}
.dq1 {
	BACKGROUND-COLOR: #b4362a; COLOR: #ffffff
}
.dq2 {
	BACKGROUND-COLOR: #ce4636; COLOR: #ffffff
}
.dq3 {
	BACKGROUND-COLOR: #fff5f4
}
.dyy {
	BACKGROUND-COLOR: #ffffff
}
.dw {
	BACKGROUND-COLOR: #ffffff
}
.dgy {
	BACKGROUND-COLOR: #d9d9d9
}
.dt1 {
	BACKGROUND-COLOR: #edecec; COLOR: #40BDE8
}
.dt2 {
	BACKGROUND-COLOR: #fdf5f4; COLOR: #40BDE8
}
A {
	FONT-SIZE: 12px
}
A:link {
	COLOR: #000000;TEXT-DECORATION: none
}
A:visited {
	COLOR: #000000;TEXT-DECORATION: none
}
A:hover {
	COLOR: red;
}
.wt {
	COLOR: #ffffff; TEXT-DECORATION: none
}
A.wt:link {
	COLOR: blue; TEXT-DECORATION: none
}
A.wt:visited {
	COLOR: blue; TEXT-DECORATION: none
}
A.wt:hover {
	COLOR: red
	
}
.wtt {
	COLOR: #ffffff; TEXT-DECORATION: none
}
A.wtt:link {
	COLOR: #ffffff; TEXT-DECORATION: none
}
A.wtt:visited {
	COLOR: #ffffff; TEXT-DECORATION: none
}
A.wtt:hover {
	COLOR: red
}	
A.wt1:link {
	COLOR: #000000; TEXT-DECORATION: none
}
A.wt1:visited {
	COLOR: #000000; TEXT-DECORATION: none
}
A.wt1:hover {
	COLOR: #d5ea95
}
.bk {
	COLOR: #000000; TEXT-DECORATION: none
}
A.bk:link {
	COLOR: #000000; TEXT-DECORATION: none
}
A.bk:visited {
	COLOR: #000000; TEXT-DECORATION: none
}
A.bk:hover {
	COLOR: red; TEXT-DECORATION: underline
}
A.top:link {
	COLOR: #000000; TEXT-DECORATION: none
}
A.top:visited {
	COLOR: #000000; TEXT-DECORATION: none
}
A.top:hover {
	COLOR: blue; TEXT-DECORATION: underline
}
A.bk1:link {
	COLOR: #000000; TEXT-DECORATION: none
}
A.bk1:visited {
	COLOR: #000000; TEXT-DECORATION: none
}
A.bk1:hover {
	COLOR: #000000
}
A.more:link {
	COLOR: #d0571f; FONT-FAMILY: verdana; FONT-SIZE: 10px; FONT-STYLE: italic; FONT-WEIGHT: bold; TEXT-DECORATION: underline
}
A.more:visited {
	COLOR: #d0571f; FONT-FAMILY: verdana; FONT-SIZE: 10px; FONT-STYLE: italic; FONT-WEIGHT: bold; TEXT-DECORATION: underline
}
A.more:hover {
	COLOR: #ff0000; TEXT-DECORATION: underline
}
.t2 {
	BACKGROUND: #ffcbc6; COLOR: #40BDE8; FONT-SIZE: 12px
}
.111 {
	BACKGROUND: #ffffff; BORDER-BOTTOM: #622625 1px solid; BORDER-LEFT: #fff5f4 1px solid; BORDER-RIGHT: #622625 1px solid; BORDER-TOP: #fff5f4 1px solid; COLOR: #40BDE8; FONT-FAMILY: verdana; FONT-SIZE: 11px
}
.222 {
	BACKGROUND: #ffffff; BORDER-BOTTOM: #d8b4b6 1px solid; BORDER-LEFT: #622625 1px solid; BORDER-RIGHT: #d8b4b6 1px solid; BORDER-TOP: #622625 1px solid; COLOR: #40BDE8; FONT-FAMILY: verdana; FONT-SIZE: 11px
}
.send {
	BACKGROUND-COLOR: #e6f1c5; BORDER-BOTTOM: #e6f1c5 1px solid; BORDER-LEFT: #e6f1c5 1px solid; BORDER-RIGHT: #e6f1c5 1px solid; BORDER-TOP: #e6f1c5 1px solid; FONT-SIZE: 12px
}
</STYLE>

<META content="Microsoft FrontPage 4.0" name=GENERATOR></HEAD>
<BODY bgColor=#ffffff leftMargin=1 topMargin=8 marginheight="0" marginwidth="0">
                                                                                                                                                                                                                                                                                                                                       
<table border="0" cellpadding="0" cellspacing="0" width="768" align="center" height="11">
  <tr>                                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                                       
    <td bgcolor="#ffffff" width="150" height="1" valign="top">                                                                                                                                                                                                                                                                                                      
      <table border="0" cellpadding="0" cellspacing="0" width="98%" height="115" align=right>                                                                                                                                                                                                                                                                                                      
                                                                                                                            
        <tr>                                                                                                                                                             
          <td width="100%" height="18">  
          <table border="0" cellpadding="0" cellspacing="0" width="99%">              
      <tr>              
        <td width="100%" bgcolor="#000000">              
          <table border="0" cellspacing="1" width="100%">              
            <tr>              
              <td width="100%" bgcolor="#FFFFFF">              
                <table border="0" cellspacing="0" width="100%">              
                  <tr>              
                    <td width="100%" bgcolor="#40BDE8">              
                      <table border="0" cellspacing="1" width="100%" height="41">              
                        <tr>              
                          <td width="100%" bgcolor="#40BDE8" height="14">              
                            <p align="center">◎<b>笑话分类</b>◎</p>             
                          </td>             
                        </tr>             
                                
                        <tr>             
                          <td width="100%" bgcolor="#FBDBE6" height="20">             
                            <table border="0" cellspacing="0" width="100%" cellpadding="0" height="14">             
                              <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="50%" bgcolor="#FFFFFF" align="center" height="20" valign="middle"><a href="admin.asp?typeid=<%=rs("typeid")%>"><img border="0" src="image/jt1.gif" align=absmiddle> 
                                          <%=rs("type")%></a></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>             
                            </table>             
                          </td>             
                        </tr>             
                                   
                      </table>             
                    </td>             
                  </tr>             
                </table>             
              </td>             
            </tr>             
          </table>             
        </td>             
      </tr>             
    </table>             
          </td>                                                                                                                                                             
        </tr>   
        <tr>                                                                                                                                                                                                                                                                                                       
          <td width="100%" height="2">  
          <td></tr>  
        <tr>                                                                                                                                                                                                                                                                                                       
          <td width="100%" height="12">                                                           
            <table border="0" cellpadding="0" cellspacing="0" width="99%">              
      <tr>              
        <td width="100%" bgcolor="#000000">              
          <table border="0" cellspacing="1" width="100%">              
            <tr>              
              <td width="100%" bgcolor="#FFFFFF">              
                <table border="0" cellspacing="0" width="100%">              
                  <tr>              
                    <td width="100%" bgcolor="#40BDE8">              
                      <table border="0" cellspacing="1" width="100%" height="41">
                                <tr>              
                          <td width="100%" bgcolor="#40BDE8" height="14">              
                            <p align="center">◎<b>笑话宣言◎</b></p>             
                          </td>             
                        </tr>             
                                
                        <tr>             
                                  <td width="100%" bgcolor="#FFFFFF" height="20"> 
                                    <table border="0" cellspacing="0" width="100%" cellpadding="0" height="20">             
                              <tr>             
                                                                
                                        <td width="100%" bgcolor="#FFFFFF" align="center" height="20" valign="middle">“笑话”故名思义，就是</td>            
                                                            </tr>             
                              <tr>             
                                                                
                                        <td width="100%" bgcolor="#FFFFFF" align="center" height="20" valign="middle">能引人发笑的故事或谈话</td>            
                                                            </tr>             
                              <tr>             
                                                                
                                        <td width="100%" bgcolor="#FFFFFF" align="center" height="21" valign="middle">笑话能给您带来健康的欢</td>            
                                                            </tr>             
                              <tr>             
                                                                
                                        <td width="100%" bgcolor="#FFFFFF" align="center" height="21" valign="middle">笑，使您受到某种教益或</td>            
                                                            </tr>             
                                      <tr> 
                                        <td width="100%" bgcolor="#FFFFFF" align="center" height="21" valign="middle">启发，我们将感到由衷的</td>            
                                                            </tr>             
                              <tr>             
                                                                
                                        <td width="100%" bgcolor="#FFFFFF" align="center" height="21" valign="middle">高兴。俗话说笑一笑十</td>            
                                                            </tr>             
                              <tr>             
                                                                
                                        <td width="100%" bgcolor="#FFFFFF" align="center" height="21" valign="middle">年少，希望大家在这里可</td>            
                                                            </tr>             
                              <tr>             
                                                                
                                        <td width="100%" bgcolor="#FFFFFF" align="center" height="21" valign="middle">以开心，快乐－《酷梦》</td>            
                                                            </tr>             
                            </table>             
                          </td>             
                        </tr>             
                                   
                      </table>             
                    </td>             
                  </tr>             
                </table>             
              </td>             
            </tr>             
          </table>             
        </td>             
      </tr>             
    </table>                                                                                                                                                                                                                                                                           
          </td>                                                                                                                    
        </tr>                                                                                                                                                            
      </table>                                                                                                                                                             
    </td>                                                                                                                                                                
    <td width="464" height="1" valign="top" bgcolor="#FFFFFF"> 
      <%                                           
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                                           
%>
      <table border="0" cellpadding="0" cellspacing="0" width="99%" align="center">                              
                        <tr>                                                                         
                          <td width="100%" bgcolor="#000000">                                                                         
                            <table border="0" cellspacing="1" width="100%" height="35">                                                                         
                              <tr>                                                                         
                                <td width="100%" bgcolor="#FFFFFF" height="31">                                                                         
                                  <table border="0" cellpadding="0" cellspacing="0" align="center" width="100%">                                                                         
                                    <tr>                                                                         
                                      <td width="100%" bgcolor="#40BDE8">                                                                         
                                        <table border="0" cellspacing="1" width="100%" height="56">
                          <tr>                                                                        
                                            <td width="100%" bgcolor="#40BDE8" align="left" height="17">                               
                                              　[共<b><%=rs.pagecount%></b>页] [第<%=page%>页]                                                                                                                                                                                                                                                                                                                                        
                  [<%=pagesize%>部/页] [共<%=totalfilm%>部]                                                                                                                                                                                                                                                                                                                                        
                  <%if page=1 then%>                                                                                                                                                                
                  [首 页] [上一页]                                                                                                                                                                                                                                                                                                                                        
                  <% else %>                                                                                                                                                                
                  [<a class="top" href="admin.asp?page=1&typeid=<%=typeid%>">首 页</a>] [<a class="top" href="admin.asp?page=<%=page-1%>&typeid=<%=typeid%>">上一页</a>]                                                                                                                                                                                                                                                                                                                                       
                  <%end if%>                                                                                                                                                                
                  <%if rs.pagecount-page<1 then%>                                                                                                                                                                                                                                                                                                                                       
                  [下一页] [尾 页]                                                                                                                                                                                                                                                                                                                                        
                  <%else%>                                                                                                                                                                
                  [<a class="top" href="admin.asp?page=<%=page+1%>&typeid=<%=typeid%>">下一页</a>]                                                                                                                                                                                                                                                                                                                                        
                  [<a class="top" href="admin.asp?page=<%=rs.pagecount%>&typeid=<%=typeid%>">尾                                                                                                                                                                 
                  页</a>]                                                                                                                                                                                                                                                                                                                                        
                  <%end if%>     </td>                                                                                                                                                            
                                          </tr> <%                                                                                                               
                                                                                                                                                                        
                                           if rs.eof then                                                                                                                              
                                           response.write "<tr><td bgcolor='#FFFFFF' colspan='7' align='center'><font color='red'>没有您要查询的内容或没有此类flash提供观看</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%" bgcolor="#FFFFFF" align="left" height="20"> 
                              <table border="0" cellspacing="0" width="100%">                                       
                                                <tr>                                       
                                                  
                                  <td width="70%">&nbsp;<img border="0" src="image/jt0.gif" align=absmiddle> 
                                    <a class="top" href="#" onclick="javascript:window.open('list.asp?id=<%=rs("articleid")%>','joke','scrollbars=yes,resizable=yes,width=500,height=400'); return false;"><%=rs("title")%></a><%if rs("hidden")<>0 then response.write "(<font color='red'>未审核)</font>"%></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="modify.asp?articleid=<%=rs("articleid")%>" target="_blank"><font color="green">修改</font></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="del.asp?articleid=<%=rs("articleid")%>"><font color="red">删除</font></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%" bgcolor="#40BDE8" align="left" height="20">                                                                                                         
                                                                          
                                                                      <p align="center">                                                                                                        
                                                                         
                                                                      [共<b><%=rs.pagecount%></b>页] [第<%=page%>页]                                                                                                                                                                                                                                                                                                                                        
                  [<%=pagesize%>部/页] [共<%=totalfilm%>部]                                                                                                                                                                                                                                                                                                                                        
                  <%if page=1 then%>                                                                                                                                                                
                  [首 页] [上一页]                                                                                                                                                                                                                                                                                                                                        
                  <% else %>                                                                                                                                                                
                  [<a class="top" href="admin.asp?page=1&typeid=<%=typeid%>">首 页</a>] [<a class="top" href="admin.asp?page=<%=page-1%>&typeid=<%=typeid%>">上一页</a>]                                                                                                                                                                                                                                                                                                                                       
                  <%end if%>                                                                                                                                                                
                  <%if rs.pagecount-page<1 then%>                                                                                                                                                                                                                                                                                                                                       
                  [下一页] [尾 页]                                                                                                                                                                                                                                                                                                                                        
                  <%else%>                                                                                                                                                                
                  [<a class="top" href="admin.asp?page=<%=page+1%>&typeid=<%=typeid%>">下一页</a>]                                                                                                                                                                                                                                                                                                                                        
                  [<a class="top" href="admin.asp?page=<%=rs.pagecount%>&typeid=<%=typeid%>">尾                                                                                                                                                                 
                  页</a>]                                                                                                                                                                                                                                                                                                                                        
                  <%end if%>                                                                 
                                                                      </p>                              
                                            </td>                                                                                                
                                          </tr>                                                                                                
                                                                                                
                                        </table>                                                                                                
                                      </td>                                                                                                
                                    </tr>                                                                                                
                                  </table>                                                                                                
                                </td>                                                                                                
                              </tr>                                                                                                
                            </table>                                                                                                
                          </td>                                                                                                
                        </tr>                                                                                                
                      </table>                                                                                                                                                                                                                                     
    </td>                                                                                                                                                                                                                
    <td width="146" height="1" valign="top" bgcolor="#FFFFFF"> 
      <table border="0" cellpadding="0" cellspacing="0" width="99%">                       
      <tr>                       
        <td width="100%" bgcolor="#000000">                       
          <table border="0" cellspacing="1" width="100%">                       
            <tr>                       
              <td width="100%" bgcolor="#FFFFFF">                       
                <table border="0" cellspacing="0" width="100%">                       
                  <tr>                       
                    <td width="100%" bgcolor="#40BDE8">                       
                      <table border="0" cellspacing="1" width="100%" height="41">                       
                        <tr>                       
                          <td width="100%" bgcolor="#40BDE8" height="14">                       
                            <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="100%" bgcolor="#Ffffff" height="20">                      
                            <table border="0" cellspacing="0" width="100%" cellpadding="0" height="14">                      
                              <tr>                      
                                <td width="74%" height="14"><a class="top" href="#" onclick="javascript:window.open('list.asp?id=<%=rs("articleid")%>','joke','scrollbars=yes,resizable=yes,width=500,height=400'); return false;"><%=left(rs("title"),8)%></a></td>                      
                                <td width="26%" height="14"><%=rs("hits")%></td>                      
                              </tr>                      
                            </table>                      
                          </td>                      
                        </tr>                      
                        <%                      
                        ky=ky+1                      
                        rs.movenext                      
                        if ky=21 then exit do                      
                        loop                      
                        %>                      
                      </table>                      
                    </td>                      
                  </tr>                      
                </table>                      
              </td>                      
            </tr>                      
          </table>                      
        </td>                      
      </tr>                      
    </table>                      
    </td>                                                                                                                                                                                                            
    <td width="1" height="1" valign="top" bgcolor="#33CCFF"> </td>                                                                                                                                                                                                            
  </tr>                                                                                                                                                                                                            
                                                                                                                                                                                                              
</table>                                                                                                                                                                                                                                                                                                                                                                    <table border="0" cellpadding="0" cellspacing="0" width="100%" height="52">                                                                                   
<table align="center" bgcolor="#33CCFF" width="760">
<tr><td>
<center><a href="add.htm" target="_blank"><font color="red">添加笑话</font></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="admin.asp?action=logout"><font color="green">管理员退出</a></font></center>
</td></tr></table>                                                                                 
 <%                            
     rs.close                       
  set rs=nothing                                                                               
 conn.close                                                                                  
 set conn=nothing                                                                                  
 %>                                                                                                                                                                                                
</BODY></HTML>                                                                                                                                                                                                                       
                                                             
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                           
                           
