<%
Dim a1000,b1000,uuuu,pppp
a1000 = trim(request("a1000"))
b1000 = trim(request("b1000"))
uuuu = trim(request("uuuu"))
pppp = trim(request("pppp"))
If session("adminuser")="" Then 
	Call backurl("login.asp")
End If 
'''''''''''''''''''''''基本信息编辑'''''''''''''''''''
If action="eddweb" Then
	Set oRs=server.createobject("adodb.recordset")
	sSql="Select * from [WebInfo] where Id=1"
	oRs.open sSql,oconn,1,3
		oRs("WebTitle")=trim(request("WebTitle"))
		oRs("WebUrl")=trim(request("WebUrl"))
		oRs("WebKeyWord")=trim(request("WebKeyWord"))
		oRs("WebDescription")=trim(request("WebDescription"))
		'oRs("WebAuthor")=trim(request("WebAuthor"))
		oRs("WebCopyright")=trim(request("WebCopyright"))
		oRs("WebICP")=trim(request("WebICP"))
		oRs("WebTel")=trim(request("WebTel"))
		oRs("WebMob")=trim(request("WebMob"))
		oRs("WebFax")=trim(request("WebFax"))
		oRs("WebEmail")=trim(request("WebEmail"))
		oRs("WebAddress")=trim(request("WebAddress"))
		oRs("WebZip")=trim(request("WebZip"))
		oRs("WebRoad")=trim(request("WebRoad"))
		oRs("WebQQ")=trim(request("WebQQ"))
		oRs("Web400")=trim(request("Web400"))
		
		oRs("WebKey1")=trim(request("WebKey1"))
		oRs("WebKey2")=trim(request("WebKey2"))
		oRs("WebKey3")=trim(request("WebKey3"))
		oRs("WebKey4")=trim(request("WebKey4"))
		oRs("WebKey5")=trim(request("WebKey5"))

		oRs("WebSina")=trim(request("WebSina"))
		oRs("WebQQweibo")=trim(request("WebQQweibo"))
		oRs("WebBank")=trim(request("WebBank"))
		oRs("WebYou")=trim(request("WebYou"))
		oRs("WebWang")=trim(request("WebWang"))
		oRs("WebTong")=trim(request("WebTong"))
		oRs("WebPiao")=trim(request("WebPiao"))
		oRs("WebMenu")=trim(request("WebMenu"))
		oRs("WebMenu2")=trim(request("WebMenu2"))
		oRs("WebQQname")=trim(request("WebQQname"))
		oRs("WebMyTel")=trim(request("WebMyTel"))
		oRs("WebPic")=trim(request("WebPic"))
		oRs("WebLogo")=trim(request("Images"))
		oRs("WebSound")=trim(request("WebSound"))
		oRs.update
		oRs.close
		call alert("基本信息编辑成功!","website.asp")
	Set oRs = Nothing
End If
''''''''''''''''''''''''''''管理员管理''''''''''''''''''''''''''
'管理员添加
If action="addadmin" Then
if trim(request("aaaa"))="" or trim(request("bbbb"))="" then
	call alert("用户名和密码不能为空!","lstmanager.asp")
end if
	Set oRs=server.createobject("adodb.recordset")
	sSql="Select * from [LstAdmin] where UsrAdmin='"&trim(request("aaaa"))&"'"
	oRs.open sSql,oconn,1,3
	If not oRs.eof then
	Call Alert ("用户名重复,返回重来.","-1")
	End If
		oRs.addnew
		oRs("UsrAdmin")=trim(request("aaaa"))
		oRs("UsrPass")=md5(trim(request("bbbb")),32)
		oRs("UsrLev")=trim(request("cccc"))
		oRs.update
		oRs.close
		response.redirect "lstmanager.asp"
	Set oRs = Nothing
End If
'管理员编辑
If action="eddadmin" Then
if trim(request("aaaa"))="" or trim(request("bbbb"))="" then
	call alert("用户名和密码不能为空!","lstmanager.asp")
end if
	Set oRs=server.createobject("adodb.recordset")
	sSql="Select * from [LstAdmin] where id="&Id
	oRs.open sSql,oconn,1,3
		oRs("UsrAdmin")=trim(request("aaaa"))
		oRs("UsrPass")=md5(trim(request("bbbb")),32)
		oRs("UsrLev")=trim(request("cccc"))
		oRs.update
		oRs.close
		call alert("编辑成功!","lstmanager.asp")
	Set oRs = Nothing
End If
'删除管理员
If action="deladmin" then
		set ors=Server.CreateObject("ADODB.Recordset")
		sSql="delete * from LstAdmin WHERE Id = "&Id&" "
		ors.open sSql,oconn,1,3
		set ors=nothing
		call backurl("lstmanager.asp")
End If
'''''''''''''''''''''''''广告图片管理'''''''''''''''''''''''''''''
'广告添加
If action="addbanner" Then
Call backurl("Database.asp")
End If
'广告编辑
If action="eddbanner" Then
Call backurl("Database.asp")
End If
'删除广告
If action="delbanner" then
		set ors=Server.CreateObject("ADODB.Recordset")
		sSql="delete * from Lstbanner WHERE Id = "&Id&" "
		ors.open sSql,oconn,1,3
		set ors=nothing
		call backurl("lstbanner.asp")
End If
''''''''''''''''''''''''''''产品大类管理''''''''''''''''''''''''''
'大类添加
If action="addclassbb" Then
if trim(request("aaaa"))="" then
	call alert("名称不能为空!","lstclassbb.asp")
end if
	Set oRs=server.createobject("adodb.recordset")
	sSql="Select * from [LstProCb] where Bigname='"&trim(request("aaaa"))&"'"
	oRs.open sSql,oconn,1,3
	If not oRs.eof then
	Call Alert ("名称重复,返回重来.","-1")
	End If
		oRs.addnew
		oRs("Bigname")=trim(request("aaaa"))
		oRs("Bigindex")=trim(request("bbbb"))
		oRs("Menuname")=trim(request("cccc"))
		oRs.update
		oRs.close
		response.redirect "lstclassbb.asp"
	Set oRs = Nothing
End If
'大类编辑
If action="eddclassbb" Then
	Set oRs=server.createobject("adodb.recordset")
	sSql="Select * from [LstProCb] where id="&Id
	oRs.open sSql,oconn,1,3
		oRs("Bigname")=trim(request("aaaa"))
		oRs("Bigindex")=trim(request("bbbb"))
		oRs("Menuname")=trim(request("cccc"))
		oRs.update
		oRs.close
		call alert("编辑成功!","lstclassbb.asp")
	Set oRs = Nothing
End If
'删除大类
If action="delclassbb" then
		set ors=Server.CreateObject("ADODB.Recordset")
		sSql="delete * from [LstProCb] WHERE Id = "&Id&" "
		ors.open sSql,oconn,1,3
		set ors=nothing
		call backurl("lstclassbb.asp")
End If
'''''''''''''''''''''''''''产品小类管理'''''''''''''''''''''''''''
'小类添加
If action="addclassss" Then
if trim(request("bbbb"))="" then
	call alert("名称不能为空!","lstclassss.asp")
end if
	Set oRs=server.createobject("adodb.recordset")
	sSql="Select * from [LstProCs] where SmallName='"&trim(request("bbbb"))&"'"
	oRs.open sSql,oconn,1,3
	If not oRs.eof then
	Call Alert ("名称重复,返回重来.","-1")
	End If
		oRs.addnew
		oRs("BigId")=trim(request("aaaa"))
		oRs("SmallName")=trim(request("bbbb"))
		oRs("SmallIndex")=trim(request("cccc"))
		oRs.update
		oRs.close
		response.redirect "lstclassss.asp?TT="&TT&""
	Set oRs = Nothing
End If
'小类编辑
If action="eddclassss" Then
	Set oRs=server.createobject("adodb.recordset")
	sSql="Select * from [LstProCs] where id="&Id
	oRs.open sSql,oconn,1,3
		oRs("BigId")=trim(request("aaaa"))
		oRs("SmallName")=trim(request("bbbb"))
		oRs("SmallIndex")=trim(request("cccc"))
		oRs.update
		oRs.close
		call alert("编辑成功!","lstclassss.asp?TT="&TT&"")
	Set oRs = Nothing
End If
'删除小类
If action="delclassss" then
		set ors=Server.CreateObject("ADODB.Recordset")
		sSql="delete * from [LstProCs] WHERE Id = "&Id&" "
		ors.open sSql,oconn,1,3
		set ors=nothing
		call backurl("lstclassss.asp?TT="&TT&"")
End if
'''''''''''''''''''''''''''''''''价格设置''''''''''''''''''''''''''''''''''
'添加价格设置
If action="addmmm" Then
Call backurl("Database.asp")
End If
'编辑价格设置
If action="eddmmm" Then
Call backurl("Database.asp")
End If
'删除价格设置
If action="delmmm" then
Call backurl("Database.asp")
End If
'''''''''''''''''''''''''''''''伟大的产品管理开始了''''''''''''''''''''''''''''''''''''
'添加商品
If action="addproinfo" Then
	Set oRs=server.createobject("adodb.recordset")
	sSql="Select * from [LstPro]"
	oRs.open sSql,oconn,1,3
		oRs.addnew
		oRs("PBId")=trim(request("BigClassName"))
		oRs("PSId")=trim(request("SmallClassName"))
		oRs("PSId3")=trim(request("SmallClassName3"))
		oRs("PTitle")=trim(request("PTitle"))
		oRs("PSmallPic")=trim(request("Images"))
		oRs("PNum")=trim(request("PNum"))
		oRs("PCun")=trim(request("PCun"))
		oRs("PGe")=trim(request("PGe"))
		oRs("PSize")=trim(request("PSize"))
		oRs("PColor")=trim(request("PColor"))
		oRs("ProKG")=trim(request("ProKG"))
		
		oRs("PSmoney")=trim(request("PSmoney"))
		oRs("PHmoney")=trim(request("PHmoney"))
		oRs("PZk")=trim(request("PZk"))
		oRs("PTe")=trim(request("PTe"))
		oRs("PTeMoney")=trim(request("PTeMoney"))
		
		oRs("PTuan")=trim(request("PTuan"))
		oRs("PTuanPic")=trim(request("Images2"))
		oRs("PTuanMoney")=trim(request("PTuanMoney"))
		oRs("PTuanCont")=trim(request("PTuanCont"))
		oRs("PTuanATime")=trim(request("PTuanATime"))
		oRs("PTuanEtime")=trim(request("PTuanEtime"))
		
		oRs("PContent")=trim(request("PContent"))
		oRs("PSming")=trim(request("PSming"))
		oRs("PAddtime")=now()
		oRs("Pnewtime")=now()
		oRs("Phits")=1
		oRs("PorderHits")=0
		oRs("ProTaobao")=trim(request("ProTaobao"))
		oRs("ProHot")=trim(request("ProHot"))
		oRs("ProTop")=trim(request("ProTop"))
		oRs("ProMoney")=trim(request("ProMoney"))
		oRs("ProRRR")=trim(request("ProRRR"))
		oRs("ProPPP")=trim(request("ProPPP"))
		oRs("ProYYY")=trim(request("ProYYY"))
		oRs("ProArrId")=trim(request("prowx"))

		
		oRs.update
		oRs.close
		response.redirect "lstpro.asp"
	Set oRs = Nothing
End If
'编辑商品
If action="eddproinfo" Then
	Set oRs=server.createobject("adodb.recordset")
	sSql="Select * from [LstPro] where id="&Id
	oRs.open sSql,oconn,1,3
		oRs("PBId")=trim(request("BigClassName"))
		oRs("PSId")=trim(request("SmallClassName"))
		oRs("PSId3")=trim(request("SmallClassName3"))
		oRs("PTitle")=trim(request("PTitle"))
		oRs("PSmallPic")=trim(request("Images"))
		oRs("PNum")=trim(request("PNum"))
		oRs("PCun")=trim(request("PCun"))
		oRs("PGe")=trim(request("PGe"))
		oRs("PSize")=trim(request("PSize"))
		oRs("PColor")=trim(request("PColor"))
		oRs("ProKG")=trim(request("ProKG"))
		oRs("PSmoney")=trim(request("PSmoney"))
		oRs("PHmoney")=trim(request("PHmoney"))
		oRs("PZk")=trim(request("PZk"))
		oRs("PTe")=trim(request("PTe"))
		oRs("PTeMoney")=trim(request("PTeMoney"))
		
		oRs("PTuan")=trim(request("PTuan"))
		oRs("PTuanPic")=trim(request("Images2"))
		oRs("PTuanMoney")=trim(request("PTuanMoney"))
		oRs("PTuanCont")=trim(request("PTuanCont"))
		oRs("PTuanATime")=trim(request("PTuanATime"))
		oRs("PTuanEtime")=trim(request("PTuanEtime"))
		
		oRs("PContent")=trim(request("PContent"))
		oRs("PSming")=trim(request("PSming"))
		oRs("Pnewtime")=now()
		oRs("ProTaobao")=trim(request("ProTaobao"))
		oRs("ProHot")=trim(request("ProHot"))
		oRs("ProTop")=trim(request("ProTop"))
		oRs("ProMoney")=trim(request("ProMoney"))
		oRs("ProRRR")=trim(request("ProRRR"))
		oRs("ProPPP")=trim(request("ProPPP"))
		oRs("ProYYY")=trim(request("ProYYY"))
If InStr(trim(request("prowx")),"$$$")>0 Then
Else
		oRs("ProArrId")=trim(request("prowx"))
End If

		oRs.update
		oRs.close
		call alert("编辑成功!","lstpro.asp")
	Set oRs = Nothing
End If
'删除商品
If action="delproinfo" then
Call backurl("Database.asp")
End If
'删除所有商品
If action="delproall" then
Call backurl("Database.asp")
End If
'批量删除所有商品
If action="AllDel" then
Call backurl("Database.asp")
End If
'''''''''''''''''''''''''''''''''''产品大图管理'''''''''''''''''''''''''''''''''''''''''''''
'添加大图
If action="addpic" Then
Call backurl("Database.asp")
End If
'编辑大图
If action="eddpic" Then
Call backurl("Database.asp")
End If
'删除大图
If action="delpic" then
Call backurl("Database.asp")
End if
'''''''''''''''''''''''''''''''''''会员编辑，充值，删除'''''''''''''''''''''''''''''''''''''''''''''
'编辑会员
If action="edduserinfo" Then
	Set oRs=server.createobject("adodb.recordset")
	sSql="Select * from [LstUser] where id="&Id
	oRs.open sSql,oconn,1,3
		oRs("UsrEmail")=trim(request("UsrEmail"))
		If pppp <> "" Then 
		oRs("UsrPass")=md5(pppp,32)
		End If
		oRs("UsrName")=trim(request("UsrName"))
		oRs("UsrTel")=trim(request("UsrTel"))
		oRs("UsrAddress")=trim(request("UsrAddress"))
		oRs("UsrFax")=trim(request("UsrFax"))
		oRs("UsrZip")=trim(request("UsrZip"))
		'oRs("UsrMoney")=trim(request("UsrMoney"))
		oRs("UsrState")=trim(request("UsrState"))
		oRs("UserFen")=trim(request("UserFen"))
		oRs.update
		oRs.close
		call alert("编辑成功!","lstuser.asp")
	Set oRs = Nothing
End If
'管理员充值
If action="edduserchong" Then
Call backurl("Database.asp")
End If
'删除用户
If action="deluser" then
Call backurl("Database.asp")
End If
''''''''''''''''''''''''''''''''''''收藏夹''''''''''''''''''''''''''''''''''''''''''''
'删除收藏夹
If action="delfav" then
		set ors=Server.CreateObject("ADODB.Recordset")
		sSql="delete * from [LstFav] WHERE Id = "&Id&" "
		ors.open sSql,oconn,1,3
		set ors=nothing
		call backurl("lstfav.asp")
End If
''''''''''''''''''''''''''''''''''''评论''''''''''''''''''''''''''''''''''''''''''''
'删除评论
If action="delreply" then
		set ors=Server.CreateObject("ADODB.Recordset")
		sSql="delete * from [LstRel] WHERE Id = "&Id&" "
		ors.open sSql,oconn,1,3
		set ors=nothing
		call backurl("lstreply.asp")
End If
''''''''''''''''''''''''''''''''''''财务部分''''''''''''''''''''''''''''''''''''''''''''
'支付宝信息
If action="eddzfb" Then
Call backurl("Database.asp")
End If
'易宝信息
If action="eddyee" Then
Call backurl("Database.asp")
End If
'删除充值卡
If action="delcode" then
		set ors=Server.CreateObject("ADODB.Recordset")
		sSql="delete * from [LstCode] WHERE Id = "&Id&" "
		ors.open sSql,oconn,1,3
		set ors=nothing
		Call backurl("LstCode.asp")
End If
'删除支付记录
If action="delmoney" then
		set ors=Server.CreateObject("ADODB.Recordset")
		sSql="delete * from [FMoney] WHERE Id = "&Id&" "
		ors.open sSql,oconn,1,3
		set ors=nothing
		call backurl("LstMoney.asp")
End If
'删除金额记录
If action="delusermoney" then
		set ors=Server.CreateObject("ADODB.Recordset")
		sSql="delete * from [LstUserMoney] WHERE Id = "&Id&" "
		ors.open sSql,oconn,1,3
		set ors=nothing
		call backurl("LstUserMoney.asp")
End If
'删除金额记录
If action="delusermoneychong" then
		set ors=Server.CreateObject("ADODB.Recordset")
		sSql="delete * from [LstUserMoneyChong] WHERE Id = "&Id&" "
		ors.open sSql,oconn,1,3
		set ors=nothing
		call backurl("LstUserMoneyChong.asp")
End If
'删除退还记录
If action="delbmmm" then
		set ors=Server.CreateObject("ADODB.Recordset")
		sSql="delete * from [LstBackMoney] WHERE Id = "&Id&" "
		ors.open sSql,oconn,1,3
		set ors=nothing
		call backurl("LstBackMoney.asp")
End If
''''''''''''''''''''''''''''''''''''''订单处理'''''''''''''''''''''''''''''''''''''
'删除订单
If action="delorder" then
		set ors=Server.CreateObject("ADODB.Recordset")
		sSql="delete * from [LstOrder] WHERE Id = "&Id&" "
		ors.open sSql,oconn,1,3
		set ors=nothing
		call backurl("lstorder.asp")
End If
'删除无效订单
If action="wuxiaodingdans" then
		set ors=Server.CreateObject("ADODB.Recordset")
		sSql="delete * from [LstOrder] WHERE  OState=2"
		ors.open sSql,oconn,1,3
		set ors=nothing
		call backurl("lstorder.asp")
End If
'删除缺货订单
If action="quehuodingdan" then
		set ors=Server.CreateObject("ADODB.Recordset")
		sSql="delete * from [LstOrder] WHERE  OState=3"
		ors.open sSql,oconn,1,3
		set ors=nothing
		call backurl("lstorder.asp")
End If
'删除日期订单
If action="riqi" Then
Dim rq
rq = Trim(request("rq"))
		set ors=Server.CreateObject("ADODB.Recordset")
		sSql="delete * from [LstOrder] WHERE datediff('d',OAddtime,now()) > "&rq&" "
		ors.open sSql,oconn,1,3
		set ors=nothing
		call alert(""&rq&"天之前的所有订单已经删除！","lstorder.asp")
End if
'处理正常订单
If action="eddorder" Then
Call backurl("Database.asp")
End If
'处理无效订单
If action="wuxiaodingdan" Then
Call backurl("Database.asp")
End If


'修改价格
If action="xiugaijiage" Then
Call backurl("Database.asp")
End If
'删除日志记录
If action="dellog" then
		set ors=Server.CreateObject("ADODB.Recordset")
		sSql="delete * from [LstLog] WHERE Id = "&Id&" "
		ors.open sSql,oconn,1,3
		set ors=nothing
		call backurl("LstLog.asp")
End If
'删除日志记录
If action="dellogall" then
Call backurl("Database.asp")
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'帮助添加
If action="addhelp" Then
if trim(request("bbbb"))="" then
	call alert("名称不能为空!","lstmanager.asp")
end if
	Set oRs=server.createobject("adodb.recordset")
	sSql="Select * from [LstAlone]"
	oRs.open sSql,oconn,1,3
		oRs.addnew
		oRs("Talone")=trim(request("aaaa"))
		oRs("Ntitle")=trim(request("bbbb"))
		oRs.update
		oRs.close
		response.redirect "lsthelp.asp"
	Set oRs = Nothing
End If
'帮助详细信息添加
If action="addhelpinfo" Then
	Set oRs=server.createobject("adodb.recordset")
	sSql="Select * from [LstAlone]"
	oRs.open sSql,oconn,1,3
		oRs.addnew
		oRs("Talone")=trim(request("aaaa"))
		oRs("Ntitle")=trim(request("bbbb"))
		oRs("Ncontent")=trim(request("cccc"))
		oRs("Naddtime")=now()
		oRs.update
		oRs.close
		response.redirect "lsthelp.asp?TT="&trim(request("aaaa"))&""
	Set oRs = Nothing
End If
'帮助编辑
If action="eddhelpinfo" Then
	Set oRs=server.createobject("adodb.recordset")
	sSql="Select * from [LstAlone] where id="&Id
	oRs.open sSql,oconn,1,3
		oRs("Talone")=trim(request("aaaa"))
		oRs("Ntitle")=trim(request("bbbb"))
		oRs("Ncontent")=trim(request("cccc"))
		oRs("Naddtime")=now()
		oRs.update
		oRs.close
		call alert("编辑成功!","lsthelp.asp?TT="&trim(request("aaaa"))&"")
	Set oRs = Nothing
End If
'删除帮助
If action="delhelp" then
		set ors=Server.CreateObject("ADODB.Recordset")
		sSql="delete * from [LstAlone] WHERE Id = "&Id&" "
		ors.open sSql,oconn,1,3
		set ors=nothing
		call backurl("lsthelp.asp?TT="&TT&"")
End If
'删除信件
If action="delmail" then
		set ors=Server.CreateObject("ADODB.Recordset")
		sSql="delete * from Lstmail WHERE Id = "&Id&" "
		ors.open sSql,oconn,1,3
		set ors=nothing
		call backurl("Lstmail.asp")
End If
'''''''''''''''''''''''''''''''''''''''
'邮件服务器
If action="eddemail" Then
Call backurl("Database.asp")
End If
''''''''''''''''''''''''''''会员等级管理''''''''''''''''''''''''''
'添加
If action="addlev" Then
Call backurl("Database.asp")
End If
'编辑
If action="eddlev" Then
	Set oRs=server.createobject("adodb.recordset")
	sSql="Select * from [LstUserLev] where id="&Id
	oRs.open sSql,oconn,1,3
		oRs("UTitle")=trim(request("aaaa"))
		oRs("UFen")=trim(request("bbbb"))
		oRs("UZhe")=trim(request("cccc"))
		oRs("ULev")=trim(request("dddd"))
		oRs.update
		oRs.close
		call alert("编辑成功!","lstuserlev.asp")
	Set oRs = Nothing
End If
'删除
If action="dellev" then
		set ors=Server.CreateObject("ADODB.Recordset")
		sSql="delete * from LstUserLev WHERE Id = "&Id&" "
		ors.open sSql,oconn,1,3
		set ors=nothing
		call backurl("lstuserlev.asp")
End If
'''''''''''''''''''''''''''''''''产地设置''''''''''''''''''''''''''''''''''
'添加产地
If action="addrrr" Then
if trim(request("aaaa"))="" then
	call alert("不能为空!","lstrrr.asp")
end if
	Set oRs=server.createobject("adodb.recordset")
	sSql="Select * from [LstRRR] where Mname='"&trim(request("aaaa"))&"'"
	oRs.open sSql,oconn,1,3
		oRs.addnew
		oRs("Mname")=trim(request("aaaa"))
		oRs.update
		oRs.close
		response.redirect "lstrrr.asp"
	Set oRs = Nothing
End If
'编辑产地
If action="eddrrr" Then
if trim(request("aaaa"))="" then
	call alert("不能为空!","lstrrr.asp")
end if
	Set oRs=server.createobject("adodb.recordset")
	sSql="Select * from [LstRRR] where id="&Id
	oRs.open sSql,oconn,1,3
		oRs("Mname")=trim(request("aaaa"))
		oRs.update
		oRs.close
		call alert("编辑成功!","lstrrr.asp")
	Set oRs = Nothing
End If
'删除产地
If action="delrrr" then
		set ors=Server.CreateObject("ADODB.Recordset")
		sSql="delete * from LstRRR WHERE Id = "&Id&" "
		ors.open sSql,oconn,1,3
		set ors=nothing
		call backurl("lstrrr.asp")
End If
'''''''''''''''''''''''''''''''''品牌设置''''''''''''''''''''''''''''''''''
'添加品牌
If action="addppp" Then
if trim(request("aaaa"))="" then
	call alert("不能为空!","lstppp.asp")
end if
	Set oRs=server.createobject("adodb.recordset")
	sSql="Select * from [LstPPP] where Mname='"&trim(request("aaaa"))&"'"
	oRs.open sSql,oconn,1,3
		oRs.addnew
		oRs("Mname")=trim(request("aaaa"))
		oRs.update
		oRs.close
		response.redirect "lstppp.asp"
	Set oRs = Nothing
End If
'''''''''''''''''''''''''''''''''运费设置''''''''''''''''''''''''''''''''''
'添加运费设置
If action="addyun" Then
if trim(request("aaaa"))="" then
	call alert("不能为空!","lstyun.asp")
end if
	Set oRs=server.createobject("adodb.recordset")
	sSql="Select * from [lstyun] where Mname='"&trim(request("aaaa"))&"'"
	oRs.open sSql,oconn,1,3
		oRs.addnew
		oRs("Mname")=trim(request("aaaa"))
		oRs("Mmoney")=trim(request("bbbb"))
		oRs.update
		oRs.close
		response.redirect "lstyun.asp"
	Set oRs = Nothing
End If
'编辑运费设置
If action="eddyun" Then
if trim(request("aaaa"))="" or trim(request("bbbb"))="" then
	call alert("不能为空!","lstyun.asp")
end if
	Set oRs=server.createobject("adodb.recordset")
	sSql="Select * from [lstyun] where id="&Id
	oRs.open sSql,oconn,1,3
		oRs("Mname")=trim(request("aaaa"))
		oRs("Mmoney")=trim(request("bbbb"))
		oRs.update
		oRs.close
		call alert("编辑成功!","lstyun.asp")
	Set oRs = Nothing
End If
'删除运费设置
If action="delyun" then
		set ors=Server.CreateObject("ADODB.Recordset")
		sSql="delete * from lstyun WHERE Id = "&Id&" "
		ors.open sSql,oconn,1,3
		set ors=nothing
		call backurl("lstyun.asp")
End If
'编辑品牌
If action="eddppp" Then
if trim(request("aaaa"))="" then
	call alert("不能为空!","lstppp.asp")
end if
	Set oRs=server.createobject("adodb.recordset")
	sSql="Select * from [LstPPP] where id="&Id
	oRs.open sSql,oconn,1,3
		oRs("Mname")=trim(request("aaaa"))
		oRs.update
		oRs.close
		call alert("编辑成功!","lstppp.asp")
	Set oRs = Nothing
End If
'删除品牌
If action="delppp" then
		set ors=Server.CreateObject("ADODB.Recordset")
		sSql="delete * from LstPPP WHERE Id = "&Id&" "
		ors.open sSql,oconn,1,3
		set ors=nothing
		call backurl("lstppp.asp")
End If
'''''''''''''''''''''''''''''''''年份设置''''''''''''''''''''''''''''''''''
'添加年份
If action="addyyy" Then
if trim(request("aaaa"))="" then
	call alert("不能为空!","lstyyy.asp")
end if
	Set oRs=server.createobject("adodb.recordset")
	sSql="Select * from [LstYYY] where Mname='"&trim(request("aaaa"))&"'"
	oRs.open sSql,oconn,1,3
		oRs.addnew
		oRs("Mname")=trim(request("aaaa"))
		oRs.update
		oRs.close
		response.redirect "lstyyy.asp"
	Set oRs = Nothing
End If
'编辑年份
If action="eddyyy" Then
if trim(request("aaaa"))="" then
	call alert("不能为空!","lstppp.asp")
end if
	Set oRs=server.createobject("adodb.recordset")
	sSql="Select * from [LstYYY] where id="&Id
	oRs.open sSql,oconn,1,3
		oRs("Mname")=trim(request("aaaa"))
		oRs.update
		oRs.close
		call alert("编辑成功!","lstyyy.asp")
	Set oRs = Nothing
End If
'删除年份
If action="delyyy" then
		set ors=Server.CreateObject("ADODB.Recordset")
		sSql="delete * from LstYYY WHERE Id = "&Id&" "
		ors.open sSql,oconn,1,3
		set ors=nothing
		call backurl("lstyyy.asp")
End If
''''''''''''''''''''''''''''信息分类''''''''''''''''''''''''''
'添加
If action="addnewstt" Then
if trim(request("aaaa"))="" then
	call alert("名称不能为空!","lsthelpTT.asp")
end if
	Set oRs=server.createobject("adodb.recordset")
	sSql="Select * from [LstAloneT] where Atitle='"&trim(request("aaaa"))&"'"
	oRs.open sSql,oconn,1,3
	If not oRs.eof then
	Call Alert ("名称重复,返回重来.","-1")
	End If
		oRs.addnew
		oRs("Atitle")=trim(request("aaaa"))
		oRs.update
		oRs.close
		response.redirect "lsthelpTT.asp"
	Set oRs = Nothing
End If
'编辑
If action="eddnewstt" Then
	Set oRs=server.createobject("adodb.recordset")
	sSql="Select * from [LstAloneT] where id="&Id
	oRs.open sSql,oconn,1,3
		oRs("Atitle")=trim(request("aaaa"))
		oRs.update
		oRs.close
		call alert("编辑成功!","lsthelpTT.asp")
	Set oRs = Nothing
End If
'删除
If action="delnewstt" then
		set ors=Server.CreateObject("ADODB.Recordset")
		sSql="delete * from [LstAloneT] WHERE Id = "&Id&" "
		ors.open sSql,oconn,1,3
		set ors=nothing
		call backurl("lsthelpTT.asp")
End If
'''''''''''''''''''''''''''回复评论'''''''''''''''''''''''
'编辑
If action="huifupl" Then
Call backurl("Database.asp")
End If
'''''''''''''''''''''''''''处理投诉'''''''''''''''''''''''
'编辑
If action="huifutousu" Then
Call backurl("Database.asp")
End If
'删除
If action="deltousu" then
		set ors=Server.CreateObject("ADODB.Recordset")
		sSql="delete * from [LstTousu] WHERE Id = "&Id&" "
		ors.open sSql,oconn,1,3
		set ors=nothing
		call backurl("LstTousu.asp")
End If
%>