⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 admin_edit.asp

📁 紫碟轩留言本V2.0的简单原代码请 查阅
💻 ASP
字号:
<!--#include file="conn.asp" -->
<!--#include file="sub.asp" -->
<%
Response.Buffer = True 
Response.ExpiresAbsolute = Now() - 1 
Response.Expires = 0 
Response.CacheControl = "no-cache"
if session("user")="" and session("zdqx")<>"alladmin" then
response.write"<script language=javascript>alert('你不能执行该操作,可能原因\n\n1、不是管理员\n\n2、你还没有登陆\n\n3、或者登陆超时\n\n4、没有该操作权限');location.href='index.asp' </script>"
response.End()
end if%>
<% 
id=request.QueryString("id")
if request.QueryString("act")="qxsh" then
set rs1=server.createobject("adodb.recordset")
exec1="select * from zdi where cint(m_id)='"&id&"'"
rs1.open exec1,conn,1,3
if rs1.recordcount=0 then
mgbox"参数错误,请不要手动修改各项参数"
response.End()
else
rs1("m_sh")="false"
rs1.update
rs1.close
set rs1=nothing
mgbox"取消审核成功!"
end if
end if%>
<% if request.QueryString("act")="sh" then
set rs1=server.createobject("adodb.recordset")
exec1="select * from zdi where cint(m_id)='"&id&"'"
rs1.open exec1,conn,1,3
if rs1.recordcount=0 then
mgbox"参数错误,请不要手动修改各项参数"
response.End()
else
rs1("m_sh")="true"
rs1.update
rs1.close
set rs1=nothing
mgbox"通过审核成功!"
end if
end if%>
<% if request.QueryString("act")="pb" then
set rs1=server.createobject("adodb.recordset")
exec1="select * from zdi where cint(m_id)='"&id&"'"
rs1.open exec1,conn,1,3
if rs1.recordcount=0 then
mgbox"参数错误,请不要手动修改各项参数"
response.End()
else
rs1("m_pb")="true"
rs1.update
rs1.close
set rs1=nothing
mgbox"屏蔽成功!"
end if
end if%>
<% if request.QueryString("act")="qxpb" then
set rs1=server.createobject("adodb.recordset")
exec1="select * from zdi where cint(m_id)='"&id&"'"
rs1.open exec1,conn,1,3
if rs1.recordcount=0 then
mgbox"参数错误,请不要手动修改各项参数"
response.End()
else
rs1("m_pb")="false"
rs1.update
rs1.close
set rs1=nothing
mgbox"取消屏蔽成功!"
end if
end if%>
<% if request.QueryString("act")="jh" then
set rs1=server.createobject("adodb.recordset")
exec1="select * from zdi where cint(m_id)='"&id&"'"
rs1.open exec1,conn,1,3
if rs1.recordcount=0 or rs1("m_con")<>0 then
mgbox"参数错误,请不要手动修改各项参数"
response.End()
else
rs1("m_jh")="true"
rs1.update
rs1.close
set rs1=nothing
mgbox"精华成功!"
end if
end if%>
<% if request.QueryString("act")="qxjh" then
set rs1=server.createobject("adodb.recordset")
exec1="select * from zdi where cint(m_id)='"&id&"'"
rs1.open exec1,conn,1,3
if rs1.recordcount=0 or rs1("m_con")<>0 then
mgbox"参数错误,请不要手动修改各项参数"
response.End()
else
rs1("m_jh")="false"
rs1.update
rs1.close
set rs1=nothing
mgbox"取消精华成功!"
end if
end if%>
<% if request.QueryString("act")="ding" then
set rs1=server.createobject("adodb.recordset")
exec1="select * from zdi where cint(m_id)='"&id&"'"
rs1.open exec1,conn,1,3
if rs1.recordcount=0 or rs1("m_con")<>0 then
mgbox"参数错误,请不要手动修改各项参数"
response.End()
else
rs1("m_ding")="true"
rs1.update
rs1.close
set rs1=nothing
mgbox"置定成功!"
end if
end if%>
<% if request.QueryString("act")="qxding" then
set rs1=server.createobject("adodb.recordset")
exec1="select * from zdi where cint(m_id)='"&id&"'"
rs1.open exec1,conn,1,3
if rs1.recordcount=0 or rs1("m_con")<>0 then
mgbox"参数错误,请不要手动修改各项参数"
response.End()
else
rs1("m_ding")="false"
rs1.update
rs1.close
set rs1=nothing
mgbox"取消置定成功!"
end if
end if%>
<% if request.QueryString("act")="delre" then
set rs1=server.createobject("adodb.recordset")
exec1="select * from zdi where cint(m_id)='"&id&"'"
rs1.open exec1,conn,1,3
set rs=server.createobject("adodb.recordset")
exec="select * from zdi where cint(m_id)='"&rs1("m_con")&"'"
rs.open exec,conn,1,3
if rs1.recordcount=0  then
mgbox"参数错误,请不要手动修改各项参数"
response.End()
else
rs1.delete
rs1.close
set rs1=nothing
rs("m_re")=rs("m_re")-1
rs.update
rs.close
set rs=nothing
mgbox"删除回复成功!"
end if
end if%>
<% if request.QueryString("act")="del" then
set rs1=server.createobject("adodb.recordset")
exec1="select * from zdi where cint(m_id)='"&id&"'"
rs1.open exec1,conn,1,3
set rs=server.createobject("adodb.recordset")
exec="select * from zdi where cint(m_con)='"&id&"'"
rs.open exec,conn,1,3
if rs1.recordcount=0  then
mgbox"参数错误,请不要手动修改各项参数"
response.End()
else
rs1.delete
rs1.close
set rs1=nothing
do while not rs.eof 
rs.delete
rs.movenext
	loop
rs.close
set rs=nothing
response.write "<script>  alert('主题删除成功');  location.href='index.asp'; </script>"
end if
end if%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -