<!--#include FILE="connxy.asp"-->
<!--#include FILE="bianliang.asp"-->
<!--#include FILE="3g.asp"-->
<!--#include FILE="Ascii.asp"-->
<!-- #include file="../ydzq.asp" -->
<%

Call head()
Call saycarda("放飞愿望")
id=request.querystring("id")
xyname=request("xyname")
address=request("address")
level=request("level")
tel=request("tel")
logo=request("logo")

set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select city from users where sid='"&RequestStr(sid)&"'",conn,1,1
mycity=rs("city")
rs.close
Set rs=nothing

If request("xyxy")=111 Then
If xyname="" Then
Call Error("许愿标题不能为空!!!!")
End If
If Len(xyname)<3 Then
Call Error("许愿标题不能少于三个字!!")
End If

If Len(xyname)>20 Then
Call Error("许愿标题不能大于20个字!!!!")
End If
If Len(xyname)=0 Then
Call Error("许愿标题不能空!!")
End If

If Len(xyname)=0 Then
Call Error("许愿标题不能大于20个字!!!!")
End If
If level="" Then
Call Error("许愿类型不能为空!!")
End If
If tel="" Then
Call Error("许愿内容不能为空!!")
End If
If Len(tel)<10 Then
Call Error("许愿内容不能少于10个字!!!!")
End If

If Len(tel)>200 Then

Call Error("许愿内容不能大于200个字!!")
End If
If Len(tel)=0 Then
Call Error("许愿标题不能为空!!")
End If




                set rs=server.createobject("adodb.recordset")
                sql="select * from jiudian"
                 rs.open sql,connxy,3,3
                 rs.addnew
                 rs("name")=myni
                 rs("address")=address
                 rs("level")=level
                 rs("tel")=tel
				 rs("fid")=myid
				 rs("logo")=logo
				 rs("txt")=xyname
                 rs.update
                 rs.close
                response.write Ascii("&#x7948;&#x6C42;&#x613F;&#x671B;&#x6210;&#x529F;<br/>")
		Response.Redirect "index.asp?saytk="&saytk&"&sid="& sid &""

		
Else

if saytk<>1 then
	Response.write "<form name=""form"" method=""post"" action=""xy.asp?xyxy=111&amp;saytk="&saytk&"&amp;sid="&sid&""">"
end if
%>
<%
Response.Write Ascii("祈求愿望:<br/>")
Response.Write Ascii("愿望标题:<input name=""xyname"" emptyok=""true"" maxlength=""20""/><br/>")
Response.Write Ascii("愿望类别:<select title=""level"" name=""level"" ivalue=""0"">")
Response.Write Ascii("<option value=""爱情"">爱情</option>")
Response.Write Ascii("<option value=""学业"">学业</option>")
Response.Write Ascii("<option value=""健康"">健康</option>")
Response.Write Ascii("<option value=""家庭"">家庭</option>")
Response.Write Ascii("<option value=""工作"">工作</option>")
Response.Write Ascii("<option value=""未来"">未来</option>")
Response.Write Ascii("<option value=""财富"">财富</option>")
Response.Write Ascii("<option value=""生活"">生活</option>")
Response.Write Ascii("<option value=""朋友"">朋友</option>")
Response.Write "</select><br/>"
Response.Write Ascii("愿望附图:<input name=""logo"" emptyok=""true"" value=""http://""/>（可留空）<br/>")
Response.Write Ascii("我的城市:<input name=""address"" emptyok=""true"" maxlength=""20"" value="""&mycity&"""/><br/>")
Response.Write Ascii("愿望内容:")
Response.Write "<input name=""tel"" emptyok=""true"" maxlength=""200""/><br/><anchor>"


if saytk=>2 then
Response.Write "<input type=""submit"" value=""放飞愿望吧！！""/></form><br/>"
else

Response.Write Ascii("放飞愿望吧！！")
Response.Write "<go method=""post"" href=""xy.asp?xyxy=111&amp;saytk="&saytk&"&amp;sid="&sid&""" accept-charset=""utf-8"">"
Response.Write "<postfield name=""xyname"" value=""$(xyname)""/>"
Response.Write "<postfield name=""address"" value=""$(address)""/>"
Response.Write "<postfield name=""level"" value=""$(level)""/>"
Response.Write "<postfield name=""tel"" value=""$(tel)""/>"
Response.Write "<postfield name=""logo"" value=""$(logo)""/>"
%>
</go>
</anchor>
<%End if%>

<br/>许愿时记得要闭上双眼虔诚祈祷才会灵哦...
<%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()
%>
