<!--#include file="../Inc.asp"-->
<!--#include file="../ydzq.asp"-->
<% call head()
dim nam,idi,txt,oopp,yc,sellkf,hyin,p,brr,TP,ID,typeID,cent,sore,did,ydnum
cent=0
sore=0
nam=usb(request("nam"))
TP=usb(request("TP"))
ID=usb(request("id"))
typeID=usb(request("typeID"))
idi=usb(request("idi"))
vicexs=usb(request("vicexs"))
logo=usb(request("logo"))
did=request("did")
ids=request("ids")
ydnum=request("ydnum")

if did="" or IsNumeric(did) = False then did=0

if ydnum="" or IsNumeric(ydnum) = False then ydnum=0

cent=request("cent")
sore=request("sore")

p=clng(request("p"))

yc=clng(request("yc"))
sellkf=clng(request("sellkf"))
hyin=clng(request("hyin"))
brr=clng(request("brr"))
txt=request("txt")
oopp=clng(request("oopp"))

IF TP<>"" then

if ID="" or IsNumeric(ID) = False then
if saytk>1 then
  Call Error("<title>出错</title></head><body><body bgcolor="""&yanse1&"""><p>ID无效！")
else
  Call Error("<card id=""main"" title=""出错"" ><p>ID无效！")
end if
end if
call saycardd("编辑项目")
else
call saycardd("添加项目")

end if

if nam="" then
  Call Error("名称不能为空！")
end if
if p<>1 and p<>3 and p<>10 and p<>20 and p<>30 and p<>40 then
if txt="" then
  Call Error("内容或连接地址不能为空！")
end if
end if


IF P=1 then
if cent="" or IsNumeric(cent) = False then
  Call Error(""&getcent&"无效！")
end if

if sore="" or IsNumeric(sore) = False then
  Call Error("经验无效！")
end if

end if


if idi="" or IsNumeric(idi) = False then
  Call Error("排序错误！")
end if


set rs=Server.CreateObject("ADODB.Recordset")
IF TP<>"" then
rs.open"select * from ydbbs where ID="&ID,conn,1,2
else
rs.open"select * from ydbbs",conn,1,2
rs.addnew
end if
rs("name")=nam
rs("pid")=idi
if txt<>"" then rs("test")=txt
rs("lx")=p
rs("brr")=brr
rs("yc")=yc
rs("ydnum")=ydnum
rs("did")=did
rs("oopp")=oopp
rs("myjbin")=cent
rs("myjyin")=sore
rs("hyin")=hyin
rs("sellkf")=sellkf
rs("logo")=logo
rs("vicexs")=vicexs
rs("zonejb")=ids

if typeID<>"" then rs("prentID")=typeID
rs("city")=1
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
IF TP<>"" then
response.write"成功编辑项目<br/>"
else
response.write"成功增加项目<br/>"
end if
response.write"----------<br/>"
if typeid<>"" then
response.write"<br/><a href=""adminbbsll.asp?id="&typeid&"&amp;sid="&sid&"&amp;saytk="&saytk&""">[上级页面]</a>"
end if
response.write"<br/><a href=""adminbbs.asp?sid="&sid&"&amp;saytk="&saytk&""">[同城设计]</a>"
%><!--#include file="fanhui.asp"-->
<%response.write""
call headsay()%>
