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

📄 edittypeok.asp

📁 一个关于学校网站教育资源的网站,能实现文件的上载,可以实现教育资源的共响
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!--#include file="isadmin.asp"-->
<%
id = trim(request("id"))
addtype = trim(request("addtype"))
if addtype = "" then
 response.write "<script>alert('请输入栏目名');history.go(-1);</script>"
 conn.close
 set conn = nothing
 response.end
end if
if len(addtype) > 5 then
 response.write "<script>alert('栏目名不得超过5个汉字');history.go(-1);</script>"
 conn.close
 set conn = nothing
 response.end
end if

sql = "select * from type where type='"&addtype&"' and typeid<>"&id
set rs = server.createobject("adodb.recordset")
rs.open sql,conn,1,1
if not (rs.bof and rs.eof) then
 rs.close
 set rs = nothing
 conn.close
 set conn = nothing
 response.write "<script>alert('数据库中已经有一个名为"&addtype&"的栏目了');history.go(-1);</script>"
 response.end
end if
rs.close
set rs = nothing
conn.execute "update type set type='"&addtype&"' where typeid="&id
conn.close
set conn = nothing
response.write "<script>alert('修改成功');window.location.href='addtype.asp';</script>"
%>

⌨️ 快捷键说明

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