<!--#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")="add" then
       showname=nosql(request.form("showname"))
       shownr=request.form("shownr")
       showpic=nosql(request.form("showpic"))
	   showzt=nosql(request.form("showzt"))
	   showxs=nosql(request.form("showxs"))
	   set rs=server.createobject("adodb.recordset") 
       sql="select * from snsn_loveshow_class "
       rs.open sql,conn,1,3
	   rs.addnew
	   rs("showname")=showname
	   rs("shownr")=shownr
	   rs("showpic")=showpic
	   rs("showzt")=showzt
	   rs("showxs")=showxs
	   rs("showdate")=now()
	   rs.update
       response.Write "<script language='javascript'>alert('添加成功！');window.location.href='show.asp';</script>"
       response.end
       rs.close
       set rs=nothing
end if
if request("action")="edit" then
if isChkInteger(request("id")) then
id=request("id")
else
Response.Redirect ("../index.asp")
end if
       showname=nosql(request.form("showname"))
       shownr=request.form("shownr")
       showpic=nosql(request.form("showpic"))
	   showzt=nosql(request.form("showzt"))
	   showxs=nosql(request.form("showxs"))
	   set rs=server.createobject("adodb.recordset") 
       sql="select * from snsn_loveshow_class where id="&id
       rs.open sql,conn,1,3
	   rs("showname")=showname
	   rs("shownr")=shownr
	   rs("showpic")=showpic
	   rs("showzt")=showzt
	   rs("showxs")=showxs
	   rs.update
       response.Write "<script language='javascript'>alert('修改成功！');window.location.href='show.asp';</script>"
       response.end
       rs.close
       set rs=nothing
end if
if request("action")="save" then
if isChkInteger(request("id")) then
id=request("id")
else
Response.Redirect ("../index.asp")
end if
set rslist=server.createobject("adodb.recordset") 
sql="select * from snsn_loveshow_class where id="&id
rslist.open sql,conn,1,1
showname=rslist("showname")
shownr=rslist("shownr")
showpic=rslist("showpic")

rslist.close
set rslist=nothing
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">
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style></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="1" bordercolorlight="#D7EBFF" bordercolordark="#D7EBFF" bgcolor="#BBD7FF" 退定文件夹中。\	???毎??style="border-collapse: collapse">
  <tr>
    <td height="30" bgcolor="#e8f4ff"><span class="M"><strong><FONT 
                              color=#000000>&nbsp;添加主题</FONT></strong></span></td>
  </tr>
  <TR height="20" bgcolor="#ffffff">
    <td height="50" bgcolor="f9f9f9"><form name="form1" method="post" action="?action=<%if request("action")="save" then%>edit&id=<%=nosql(request("id"))%><%else%>add<%end if%>">
      <table width="90%"  border="0" cellspacing="0" cellpadding="5">
        <tr>
          <td><input name="showname" type="text" class="wenbenkuang" id="title3" value="<%=showname%>" size="80"></td>
        </tr>
        <tr>
          <td><textarea name="shownr" cols="80" rows="8" class="wenbenkuang" id="shownr"><%=shownr%></textarea></td>
        </tr>
        <tr>
          <td><input name="showpic" type="text" class="wenbenkuang" id="showpic" value="<%=showpic%>" size="80"></td>
        </tr>
        <tr>
          <td><input type="submit" name="Submit" class="go-wenbenkuang" value="立即添加">
            <input name="showzt" type="radio" value="0" checked >
            不使用
            <input type="radio" name="showzt" value="1">
            使用
            <input name="showxs" type="radio" value="0" checked >
不显示<input type="radio" name="showxs" value="1">
显示</td>
        </tr>
      </table>
    </form></td>
  </TR>
</TABLE>
</body>
</html>
