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

📄 admin_bigclasseditok.asp

📁 庐江二中
💻 ASP
字号:
<!--#include file="session.asp"-->
<%checkAdmin2%>
<!--#include file="conn.asp"-->
<%
founderr=false

function changechr(str)
changechr=replace(replace(replace(replace(str,"<","&lt;"),">","&gt;"),chr(13),"<br>")," "," ")
changechr=replace(changechr,"'","&acute;")
changechr=replace(changechr,mid(" "" ",2,1),"&quot;")
end function

dim OldBigClassName,NewBigClassName
OldBigClassName=request("OldBigClassName")
NewBigClassName=changechr(trim(request("NewBigClassName")))
if NewBigClassName="" then
	errmsg=errmsg+"<li>大类名称不能为空!"
	founderr=true
end if

sql="select * from BigClass"
rs.open sql,conn,3,3
do while not rs.eof
if rs("BigClassName")=NewBigClassName then
	errmsg=errmsg+"<li>已存在这个分类或没有做任何改动!"
	founderr=true
end if
rs.movenext
loop
rs.close

if founderr=true then
	set rs=nothing
	conn.close
	set conn=nothing
	call error()
else

'修改大类库
sql="select * from BigClass where BigClassName='"&OldBigClassName&"'"
rs.open sql,conn,3,3
rs("BigClassName")=NewBigClassName
rs.update
rs.close

'修改小类库
sql="select * from SmallClass where BigClassName='"&OldBigClassName&"'"
rs.open sql,conn,3,3
do while not rs.eof
rs("BigClassName")=NewBigClassName
rs.update
rs.movenext
loop
rs.close

'修改文章库
sql="select * from news where BigClassName='"&OldBigClassName&"'"
rs.open sql,conn,3,3
do while not rs.eof
rs("BigClassName")=NewBigClassName
rs.update
rs.movenext
loop
rs.close

set rs=nothing
conn.close
set conn=nothing
response.redirect "admin_BigClassMana.asp"
end if
%>

⌨️ 快捷键说明

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