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

📄 e_smallclassset.asp

📁 zheng fu wang zhan gong neng qi quan
💻 ASP
字号:
<!--#INCLUDE FILE="Conn.asp" -->
<!--#include file="ConnUser.asp"-->
<!--#include file="config.asp"-->
<!--#include file="char.inc"-->
<!--#include file="chkuser.asp" -->
<!--#include file="ChkURL.asp"-->
<%
IF request.cookies(eChuang)("KEY")="" THEN
	Show_Err("对不起,您的后台管理权限不够操作!")
	response.end
else
	if request("action")="update" then
		dim smallclassorder,smallclassma,E_smallclassview,E_smallclassname,bigclassid,smallclasszs,classurl
		for i=1 to request.form("smallclassid").count
			smallclassid=CheckStr(request.form("smallclassid")(i))
			smallclassorder=CheckStr(request.form("smallclassorder")(i))
			smallclassma=CheckStr(request.form("smallclassma")(i))
			E_smallclassview=CheckStr(request.form("E_smallclassview")(i))
			E_smallclassname=CheckStr(request.form("E_smallclassname")(i))
			bigclassid=CheckStr(request.form("bigclassid")(i))
			smallclasszs=CheckStr(request.form("smallclasszs")(i))
			classurl=CheckStr(request.form("url")(i))
			if CheckStr(request.form("smallclassorder")(i))="" then
				Show_Err("请填写小类排序!<br><br><a href=history.go(-1)>返回</a>")
				response.end
			end if
			if CheckStr(request.form("smallclassma")(i))="" then
				smallclassma="无"
			else
				master=split(CheckStr(request.form("smallclassma")(i)),"|")
			 	for k=0 to ubound(master)
					set rs=server.createobject("adodb.recordset")
					sql="Select * from "& db_User_Table &" where oskey='smallmaster' and  "& db_User_Name &"='"&trim(master(k))&"'"
					rs.open sql,ConnUser,1,3
					if trim(master(k))<>"无" then
						if rs.eof then
							Show_Err("小类管理员中无“& trim(master(k)) &”用户!请重新选择该小类的管理员!<br><br><a href='javascript:history.back()'>返回</a>")
							Response.End
						end if
					else
						smallclassma="无"
					end if
					rs.close
					set rs=nothing
				next
			end if
			conn.execute("update "& db_smallclass_Table &" set smallclassorder="&smallclassorder&",smallclassma='"&smallclassma&"',E_smallclassview="&E_smallclassview&",E_smallclassname='"&E_smallclassname&"',bigclassid="&bigclassid&",smallclasszs='"&smallclasszs&"',url='"&classurl&"' where smallclassid="&smallclassid)
			Set nrs = Server.CreateObject("ADODB.Recordset")
			sqln="select * from "& db_News_Table &" where smallclassid="&smallclassid
			nrs.open sqln,conn,3,3
			while not nrs.EOF
				nrs("bigclassid")=bigclassid
				nrs.MoveNext
			wend
			nrs.close
			set nrs=nothing
		next
	end if

	if request("action")="add" then
		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
					
		smallclasszs=request.form("smallclasszs")
		E_smallclassname=changechr(trim(request("E_smallclassname")))
		smallclassorder=request.form("smallclassorder")
		smallclassma=request.form("smallclassma")
		E_smallclassview=request.form("E_smallclassview")
		bigclassid=request.form("bigclassid")
		typeid=request.form("typeid")
		classurl=request.Form("url")
		
		If E_smallclassname="" Then
			Show_Err("小类名称不能为空!请<a href=javascript:history.go(-1)>返回重新填写</a>!")
			response.end
		end if
		If smallclassorder="" Then
			Show_Err("小类排序不能为空!请<a href=javascript:history.go(-1)>返回重新填写</a>!")
			response.end
		end if
		
		Set rs = Server.CreateObject("ADODB.Recordset")
		sql="select * from "& db_SmallClass_Table &""
		rs.open sql,conn,3,3
	 	rs.addnew
		rs("E_smallclassname")=E_smallclassname
		rs("smallclasszs")=smallclasszs
		rs("bigclassid")=bigclassid
		rs("typeid")=typeid
		rs("url")=classurl
		if smallclassorder="" then
			rs("smallclassorder")=0
		else
			rs("smallclassorder")=smallclassorder
		end if
		rs("E_smallclassview")=E_smallclassview
		if smallclassma="" then
			rs("smallclassma")="无"
		else
			rs("smallclassma")=smallclassma
		end if
		rs.update
		bigclassid=rs("bigclassid")
		rs.close
		set rs=nothing
	end if
		
	conn.close
	set conn=nothing
	response.write "<meta http-equiv=""refresh"" content="""&freetime&";url=E_SmallClassManage.asp?bigclassid="&bigclassid&""">"
	Show_Message("<p align=center><font color=red>恭喜您!设置成功!<br><br>"&freetime&"秒钟后返回上页!</font>")
	response.end
end if
%>

⌨️ 快捷键说明

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