可以做论坛

源代码在线查看: editfenlei.asp

软件大小: 114 K
上传用户: zcflion
关键词: 论坛
下载地址: 免注册下载 普通下载 VIP

相关代码

				 
				
				
				
				
				
				
				
				
				   
				     
				      				if uzhiwu=100 then '是管理员
				
				IDLF=request("idl")
				unlei=request("unlei")
				if unlei"" then
				conn.Execute("update luntan set fenlei=0 where idl="&IDLF)
				response.redirect"editfenlei.asp?idl="&IDLF&""
				end if
				del=request("del")
				 '删除分类
				if del"" then
				cc="select * from luntan where idl=" & del &""
				set rs=server.createobject("adodb.recordset")
				rs.open cc,conn,1,3
				response.write"你要删除["&rs("luntan")&"]分类,此操作不可还原,请选择:[只删除此类名称] [删除此类与此分类下的所有"&sbbs&"]"
				delall=request("delall")
				if delall"" then
				if delall=0 then
				conn.Execute("update luntan set fenlei=0 where fenlei="&del)
				set rsdellt=server.createobject("adodb.recordset")
				ccdellt="delete * from luntan where idl="&del
				rsdellt.open ccdellt,conn,1,3
				response.redirect"editfenlei.asp?idl="&IDLF&""
				else
				set rsdellt=server.createobject("adodb.recordset")
				ccdellt="delete * from luntan where fenlei="&del&" or idl="&del&""
				rsdellt.open ccdellt,conn,1,3
				response.redirect"editfenlei.asp?idl="&IDLF&""
				end if
				end if
				end if
				 '增加分类
				addn=request("addn")
				if addn"" then
				response.Write""
				response.Write""
				response.Write"分类名称:"
				response.Write""
				response.Write""
				if request.form("newluntan")"" then
				newluntan=request("newluntan")
				newluntan=Trim(newluntan)
				cc="select * from luntan where luntan= '" & newluntan &"'"
				set rs=server.createobject("adodb.recordset")
				rs.open cc,conn,1,3
				if rs.eof then
				rs.AddNew
				rs("luntan")=newluntan
				rs("fenlei")= -1
				rs.Update
				response.redirect"editfenlei.asp?idl="&IDLF&""
				else
				Response.Write "你要建立的"&sbbs&"已经存在返重新填加"
				end if
				end if
				end if
				 '修改名称
				md=request("md")
				if md"" then
				conn.Execute("update luntan set fenlei='"&md&"' where idl="&request("idl"))
				response.redirect"editfenlei.asp?idl="&IDLF&""
				end if 
				if request("modify")"" then
				IDLF=request("idl")
				modify=request("modify")
				ccfl="select  * from luntan where idl="&modify&""
				set rsfl=server.createobject("adodb.recordset")
				rsfl.open ccfl,conn,1,1
				response.write""
				response.write""
				response.write""&sbbs&"名称:"
				response.write""
				response.write" "
				luntan=request.form("luntan")
				'response.write"修改"&luntan&""
				if luntan"" then 
				conn.Execute("update luntan set luntan='"&luntan&"' where idl="&request("modify"))
				response.redirect"editfenlei.asp?idl="&IDLF&""
				end if
				
				
				else 
				ccfl="select  * from luntan where idl="&IDLF&""
				set rsfl=server.createobject("adodb.recordset")
				rsfl.open ccfl,conn,1,1
				if not rsfl.eof then '已删除
				fenlei=rsfl("fenlei")
				'response.write"修改"&fenlei&""
				if CInt(fenlei)				fenlei="未加入分类"
				else
				ccfll="select  * from luntan where idl="&fenlei&""
				set rsfll=server.createobject("adodb.recordset")
				rsfll.open ccfll,conn,1,1
				fenlei=rsfll("luntan")
				end if
				
				response.write""
				response.write"["&rsfl("luntan")&"]"&sbbs&" 属于:"&fenlei&"  [修改"&rsfl("luntan")&""&sbbs&"名称] [取消分类]"
				response.write"目前所有分类:[填加新分类]"
				ccflfl="select  * from luntan where fenlei= -1"
				set rsflfl=server.createobject("adodb.recordset")
				rsflfl.open ccflfl,conn,1,1
				i=0
				do while not rsflfl.eof
				if i mod 2 =0 then
				response.write""
				end if
				i=i+1
				response.write""&rsflfl("luntan")&" [删除此类] [修改分类名称] [填加到此类]"
				rsflfl.MoveNext 
				loop
				response.write""
				else '已删除
				Response.Write""&sbbs&"不存在或已删除"
				end if '已删除
				
				
				end if
				else
				Response.Write"非管理员不可以操作"
				end if
				%>
				    
				  
								Response.Write""&asptbcopy&""
				Response.Flush%>			

相关资源