<!--#include file="../conn/conn.asp"-->
<!--#include file="../conn/nosql.asp"-->
<!--#include file="../conn/config.asp"-->
<!--#include file="../conn/page.asp"-->
<%if Not ChkPosturl then response.redirect ("login.asp")
if session("adminname")="" then
response.Write "<script language='javascript'>alert('网络超时或您还没有登陆！');window.location.href='login.asp';</script>"
response.End
end if
if request("action")="zt" then
if isChkInteger(request("id")) then
id=request("id")
else
Response.Redirect ("../../index.asp")
end if 
if nosql(request("zt"))="1" then
conn.execute("update [snsn_loveshow_class] set showzt=0")
conn.execute("update [snsn_loveshow_class] set showzt=1 where id="&id&"")
elseif nosql(request("zt"))="0" then
conn.execute("update [snsn_loveshow_class] set showzt=0")
conn.execute("update [snsn_loveshow_class] set showzt=0 where id="&id&"")
else
response.write "<script language='javascript'>"
response.write "alert('非法操作！');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
end if
response.write "<script language='javascript'>"
response.write "alert('操作成功，正在返回！');"
response.write"this.location.href='show.asp';</SCRIPT>"
response.end
end if
if request("action")="xs" then
if isChkInteger(request("id")) then
id=request("id")
else
Response.Redirect ("../../index.asp")
end if 
if nosql(request("xs"))="1" then
conn.execute("update [snsn_loveshow_class] set showxs=1 where id="&id&"")
elseif nosql(request("xs"))="0" then
conn.execute("update [snsn_loveshow_class] set showxs=0 where id="&id&"")
else
response.write "<script language='javascript'>"
response.write "alert('非法操作！');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
end if
response.write "<script language='javascript'>"
response.write "alert('操作成功，正在返回！');"
response.write"this.location.href='show.asp';</SCRIPT>"
response.end
end if

if request("action")="del" then
if isChkInteger(request("id")) then
id=request("id")
else
Response.Redirect ("../../index.asp")
end if 
conn.execute "delete from snsn_loveshow_class where id in ("&id&")"
conn.execute "delete from snsn_loveshow where classid in ("&id&")"
response.write "<script language='javascript'>"
response.write "alert('操作成功，正在返回！');"
response.write"this.location.href='show.asp';</SCRIPT>"
response.end
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<link href="../css.css" REL="stylesheet" TYPE="text/css">
</head>

<body>
<table width="100%" border="0" cellspacing="0" cellpadding="5">
  <tr>
    <td width="30%" style="font-size:14px;color:#ffffff">&nbsp;<strong><font color="#000000">主题管理</font></strong></td>
    <td width="70%" align="right">&nbsp;</td>
  </tr>
</table>
<table width="90%"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="30">&nbsp;</td>
  </tr>
</table>

<TABLE width="90%" border="0" align="center" cellpadding="0" cellspacing="1" bordercolorlight="#D7EBFF" bordercolordark="#D7EBFF" bgcolor="#BBD7FF" 退定文件夹中。\	???毎??style="border-collapse: collapse">
     <tr bgcolor="#e8f4ff">  <TD height="25" bgcolor="#e8f4ff">&nbsp;主题</td>
       <TD width="160">&nbsp;时间</td>
	   <TD width="80">&nbsp;当前主题</td>
       <%
set rs=server.createobject("adodb.recordset") 
sql="select * from snsn_loveshow_class order by showzt desc,id desc"
rs.open sql,conn,1,1 
if rs.eof or rs.bof then 
response.write "<tr><td bgcolor=#FFFFFF colSpan=6><p align='center'>对不起，没有您要查询的信息</p></td></tr>" 
else
rs.PageSize =20 '每页记录条数
		iCount=rs.RecordCount '记录总数
		iPageSize=rs.PageSize
    	maxpage=rs.PageCount 
    	page=request("page")
    	per_page=rs.PageSize
    
    if Not IsNumeric(page) or page="" then
        page=1
    else
        page=cint(page)
    end if
    
    if page<1 then
        page=1
    elseif  page>maxpage then
        page=maxpage
    end if
    
    rs.AbsolutePage=Page

	if page=maxpage then
		x=iCount-(maxpage-1)*iPageSize
	else
		x=iPageSize
	end if
	For i=1 To x%> <%do while not rs.eof%>
  <TR bgcolor="#FFFFFF" onMouseOver='JavaScript:this.style.backgroundColor="#FCFBF3"' onMouseOut='JavaScript:this.style.backgroundColor=""' height="20">
    <TD height="10">&nbsp;<font color="#FF0000"><%=rs("showname")%></font> [
      <%if rs("showzt")=1 then%>
      <font color="#FFcc00">使用中</font>
      <%else%>
      不使用
      <%end if%> | 
	  <%if rs("showxs")=1 then%>
      <font color="#FFcc00">显示</font>
      <%else%>
      不显示
      <%end if%>
      ]
    <a href="?action=del&id=<%=rs("id")%>">删</a> <a href="show_add.asp?action=save&id=<%=rs("id")%>">编辑</a> </td>
    <TD>&nbsp;<%=rs("showdate")%></td>
    <TD>&nbsp;
    <%if rs("showzt")=0 then%>
    <a href="?action=zt&id=<%=rs("id")%>&zt=1">使用</a>    <%else%>
    <a href="?action=zt&id=<%=rs("id")%>&zt=0">不使用</a>
    <%end if%> | 
	<%if rs("showxs")=0 then%>
    <a href="?action=xs&id=<%=rs("id")%>&xs=1">显示</a>    <%else%>
    <a href="?action=xs&id=<%=rs("id")%>&xs=0">不显示</a>
    <%end if%></td>
  </TR>
  <TR bgcolor="#FFFFFF" onMouseOver='JavaScript:this.style.backgroundColor="#FCFBF3"' onMouseOut='JavaScript:this.style.backgroundColor=""' height="20">
    <TD height="11" colspan="3">&nbsp;<%=rs("shownr")%></td>
  </TR>
  <%
rs.movenext
loop

%><%
		  icolor=icolor+1
if icolor>1 then icolor=0

next%>
</TABLE>
<TABLE width="90%" 
        border=0 align="center" cellPadding=4 cellSpacing=0>
  <TBODY>
    <TR>
      <TD class=M noWrap align=middle><%
					call PageControl(iCount,maxpage,page,"border=0 align=center","<p align=center>",per_page)
				  %></TD>
    </TR>
  </TBODY>
</TABLE>
<%

end if%>
</body>
</html>
