addmtvsave.asp
来自「全站生成htm静态页面」· ASP 代码 · 共 182 行
ASP
182 行
<!--#include file="function.asp"-->
<%CheckAdmin1%>
<!--#include file="conn.asp"-->
<!--#include file="char.inc"-->
<%
act=request("act")
Page=request.QueryString("Page")
Askclassid=request.QueryString("Askclassid")
Asksclassid=request.QueryString("Asksclassid")
AskNclassid=request.QueryString("AskNclassid")
mtvlistid=request.QueryString("mtvlistid")
if act<>"SetIsGood" then
Classic=request.form("Classic")
ConClassic=split(Classic,",")
Classid=ConClassic(0)
SClassid=ConClassic(1)
NClassid=ConClassic(2)
end if
set rs=server.createobject("adodb.recordset")
founerr=false
if act<>"SetIsGood" then
if trim(Request.Form ("name"))="" then
founderr=true
errmsg="<li>MTV名称不能为空</li>"
else
Name=trim(Request.Form ("Name"))
end if
sql="select Sclass from Sclass where Sclassid="&SClassid
rs.open sql,conn,1,1
if not rs.EOF then
Sclass=rs("Sclass")
else
founderr=true
errmsg=errmsg+"<li>二级分类选择错误</li>"
end if
rs.close
sql="select Nclass from Nclass where Nclassid="&NClassid
rs.open sql,conn,1,1
if not rs.EOF then
Nclass=rs("Nclass")
else
founderr=true
errmsg=errmsg+"<li>三级分类选择错误</li>"
end if
rs.close
end if
if founderr=true then
call error()
else
if act<>"SetIsGood" then
Name=request("name")
if trim(Request.Form("Yuyan"))="" then
Yuyan="未知"
else
Yuyan=request.form("Yuyan")
end if
if trim(Request.Form("orders"))="" then
orders="未知"
else
orders=request.form("orders")
end if
if trim(Request.Form("pic"))="" then
pic="images/Nophoto.gif"
else
pic=request.form("pic")
end if
end if
if act="edit" and mtvlistid<>"" then
'修改商品资料
sql="select * from mtvlist where mtvlistid="&mtvlistid
rs.open sql,conn,1,3
rs("name")=trim(name)
rs("Yuyan")=trim(Yuyan)
rs("order")=trim(order)
rs("pic")=trim(pic)
rs("Classid")=Classid
rs("SClassid")=SClassid
rs("SClass")=SClass
rs("Nclassid")=Nclassid
rs("Nclass")=Nclass
rs("mtvurl")=mtvurl
rs("singer")=singer
rs("hot")=hot
rs("club")=club
rs.update
rs.close
'结束修改
elseif act="add" then
sql="select * from mtvlist where (mtvlistid is null)"
rs.open sql,conn,1,3
rs.addnew
rs("name")=trim(name)
rs("Yuyan")=trim(Yuyan)
rs("order")=trim(order)
rs("pic")=trim(pic)
rs("classid")=classid
rs("SClass")=SClass
rs("Sclassid")=Sclassid
rs("Nclassid")=Nclassid
rs("Nclass")=Nclass
rs("mtvurl")=mtvurl
rs("singer")=singer
rs("hot")=hot
rs("club")=club
rs("Time")=date
rs.update
rs.close
elseif act="SetIsGood" then
sql="select IsGood from mtvlist where IsGood=1"
rs.open sql,conn,1,3
if not rs.EOF then
do while not rs.EOF
rs("IsGood")=1
rs.update
rs.MoveNext
loop
end if
rs.close
sql="select IsGood from mtvlist where mtvlistid="&mtvlistid
rs.open sql,conn,1,3
if not rs.EOF then
if rs("IsGood")=true then
rs("IsGood")=0
else
rs("IsGood")=1
end if
rs.update
end if
rs.close
else
conn.close
set conn=nothing
Response.Write "操作错误!"
Response.End
end if
set rs=nothing
end if
conn.close
set conn=nothing
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="RSHOP" content="音乐酒吧MTV站">
<meta Author="Recall Star" content="音乐酒吧MTV站">
<title>音乐酒吧MTV站</title>
<!--#include file="style.asp"-->
</head>
<body topmargin="111" leftmargin="0" bgcolor="#F9FFF4">
<div align="center">
<center>
<table border="0" cellspacing="0" width="60%">
<tr>
<td width="100%">
<div align="center">
<table border="1" cellpadding="0" cellspacing="0" width="100%" style="border-collapse: collapse" bordercolor="#64CB1F">
<tr>
<td width="100%" bgcolor="#ECFEDE" height="80" align="center">
<font color="#64CB1F">
<b>O K ! 操 作 完 成 ! ^_^</b> </font>
<p><b><a href="javascript:history.go(-1)"><font color="#FF0000">...::: 点 此 返 回
:::...</font></a></b><font color="#FF0000"> </font>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</center>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?