📄 action.asp
字号:
<!--#include file="../function/tablefunction.asp" -->
<%
'------------删除记录模块
dim action,classid,delRs,msmax
set msmax=new myclass
action=request.querystring("action")
Classid=request.querystring("classid")
if action="delRecord" then
DelRs=msmax.DelRecord("ImgClass","ImgClassid",classid,"Image_class.asp")
end if
%>
<%
imgid=request.QueryString("imgid")
if action="imgEdit" then
dim rs,strsql
set rs=server.CreateObject("adodb.recordset")
strsql="select * from img where imgid="&imgid
rs.open strsql,db,0,2
rs("imgtitle")=request.form("imgtitle")
rs("classname")=request.Form("classname")
rs.update
response.Redirect "image_edit.asp"
end if
%>
<%
'-----------添加记录模块
if request.querystring("action")="add" then
addRs=msmax.addRecord("ImgClass","ClassName,ClassIntro","Image_class.asp")
addrs.close
set addrs=nothing
db.close
set db=nothing
end if
%>
<%
if action="delimg" then
imgid=request.QueryString("imgid")
DelRs=msmax.DelRecord("img","imgid",imgid,"image_edit.asp?pageno="&session("pageno"))
end if
%>
<%
if action="delImgComment" then
imgcommentid=request.QueryString("imgcommentid")
DelRs=msmax.DelRecord("imgcomment","imgcommentid",imgcommentid,"image_comment.asp?pageno="&session("pageno"))
end if
%>
<%
'------------------------按钮删除记录
if action="butdelImgComment" then
imgcommentid=request.form("myselect")
imgcommentid=Replace(imgcommentid," ","")
strsql="delete from imgcomment where imgcommentid in (" & imgcommentid & ")"
Response.Write strSql
db.execute(strsql)
'response.write articleid
response.redirect "image_comment.asp?pageno="&session("pageno")
end if
%>
<%
'------------------------按钮删除记录
if action="butdel" then
ImgID=request.form("myselect")
ImgID=Replace(ImgID," ","")
strsql="delete from img where ImgID in (" & ImgID & ")"
Response.Write strSql
db.execute(strsql)
'response.write articleid
response.redirect "image_edit.asp?pageno="&session("pageno")
end if
%>
<%
'--------------------以下还有点问题
if action="update" then
total=request.form("total")
response.Write total
for i=1 to total
imgclassID=request.form("imgclassID"& i)
ClassName=request.form("ClassName"& i)
ClassIntro=request.form("ClassIntro"& i)
desc=request.form("index"& i)
response.write desc
strsql="update imgclass set ClassName='"& ClassName &"',ClassIntro='"& ClassIntro &"',[index]="& desc &" where imgclassID="&imgclassID
db.execute(strsql)
next
end if
response.redirect "image_class.asp"
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -