<!--#include FILE="conn.asp"-->
<!-- #include file="../conn.asp" -->
<!--#include FILE="../admin.asp"-->
<%

Call head()
Call saycarda("修改足球赛事")
id=request.querystring("id")
about=request("about")
txt=request("txt")
xs=request("xs")
logo=request("logo")
yfmd=request("yfmd")
yfsc=request("yfsc")
yfzy=request("yfzy")
yfxg=request("yfxg")
If request("xyxy")=111 Then
If keys<>1 And keys<>2 Then
Call Error("无权管理!!!!")
End If
If about="" Then
Call Error("标题不能为空!!!!")
End If
If Len(about)<3 Then
Call Error("标题不能少于三个字!!")
End If

If Len(about)>20 Then
Call Error("标题不能大于20个字!!!!")
End If
If txt="" Then
Call Error("内容不能为空!!")
End If
If Len(txt)<10 Then
Call Error("内容不能少于10个字!!!!")
End If



                set rs=Server.CreateObject("ADODB.Recordset")
                rs.open"select * from zhuqiu where id="&id,connqiu,1,2
                 rs("about")=about
                 rs("txt")=txt
                 rs("userid")=myid
				 rs("logo")=logo
				 rs("xs")=xs
				 rs("yfmd")=yfmd
				 rs("yfsc")=yfsc
				 rs("yfzy")=yfzy
				 rs("yfxg")=yfxg
                 rs.update
                 rs.close
                response.write "修改成功<br/>"


		
Else
set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select * from zhuqiu where id="&id,connqiu,1,1
yfabout=rs("about")
yftxt=rs("txt")
yflogo=rs("logo")
yfxs=rs("xs")
yfuserid=rs("userid")
yfmd=rs("yfmd")
yfsc=rs("yfsc")
yfxg=rs("yfxg")
yfzy=rs("yfzy")
rs.close
Set rs=Nothing

If yfuserid=myid or keys=1 or keys=2 Then
else
Call Error("无权修改!")
End If


if saytk<>1 then
	Response.write "<form name=""form"" method=""post"" action=""add.asp?xyxy=111&amp;saytk="&saytk&"&amp;sid="&sid&""">"
end if

Response.Write "修改足球赛事:<br/>"
Response.Write "赛事标题:（20字以内）<br/><input name=""about"" emptyok=""true"" maxlength=""20""/><br/>"
Response.Write "赛事内容:（5000字以内）<br/>"

if saytk=1 then
Response.write "<input name=""txt"" emptyok=""true"" maxlength=""5000""/><br/>"
else
Response.write "<textarea name=""txt"" emptyok=""true"" rows=""15"" cols=""15""></textarea><br/>"
end If





Response.Write ("附图:<input name=""logo"" emptyok=""true"" value=""""/><br/>")
Response.Write "开赛时间:"
Response.Write "（如:英超@2011-1-1 8:00）<br/>求<input name=""yfmd"" emptyok=""true"" maxlength=""50"" value="""&yfyfmd&"""/><br/>"
if saytk=>2 then
Response.Write "<input type=""submit"" value=""确定发布""/></form><br/>"
else

Response.write "<anchor title=""确定发布"">确定发布"
	Response.write "<go href=""add.asp?xyxy=111&amp;saytk="&saytk&"&amp;sid="&sid&""" method=""post"">"
	Response.Write "<postfield name=""about"" value=""$(about)""/>"
Response.Write "<postfield name=""txt"" value=""$(txt)""/>"
Response.Write "<postfield name=""xs"" value=""$(xs)""/>"
Response.Write "<postfield name=""logo"" value=""$(logo)""/>"
Response.Write "<postfield name=""yfsc"" value=""$(yfsc)""/>"
Response.Write "<postfield name=""yfxg"" value=""$(yfxg)""/>"
Response.Write "<postfield name=""yfmd"" value=""$(yfmd)""/>"
Response.Write "<postfield name=""yfzy"" value=""$(yfzy)""/>"
	Response.write "</go></anchor>"&chr(13)
	End if%>
<%End if%>
<br/><a href='index.asp?saytk=<%=saytk%>&amp;sid=<%=sid%>'>足球</a>
-<a href='/bbs/index.asp?saytk=<%=saytk%>&amp;sid=<%=sid%>'>社区</a>-
<a href='/index.asp?saytk=<%=saytk%>&amp;sid=<%=sid%>'>首页</a>
<%
Call headsay()
%>
