<!--#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 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")
                sql="select * from xywap_sms_list where id="&id
                 rs.open sql,connsmss3,1,3
                 rs("name")=about
                 rs("zuozhe")=logo
				 rs("content")=txt
				 rs("classid")=yfmd
				 rs("time")=Now()
				 rs("WriteTime")=Now()
                 rs.update
                 rs.close
                response.write "修改成功<br/>"


		
Else

                set rs=server.createobject("adodb.recordset")
                sql="select * from xywap_sms_list where id="&id
                rs.open sql,connsmss3,1,1

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

Response.Write "修改短信:<br/>"
Response.Write "标题:（20字以内）<br/><input name=""about"" emptyok=""true"" maxlength=""20"" value="""&rs("name")&"""/><br/>"
Response.Write "内容:（5000字以内）<br/>"
if saytk=1 then
Response.write "<input name=""txt"" emptyok=""true"" maxlength=""5000"" value="""&rs("content")&"""/><br/>"
else
Response.write "<textarea name=""txt"" emptyok=""true"" rows=""15"" cols=""15"">"&rs("content")&"</textarea><br/>"
end If
Response.Write ("作者:<input name=""logo"" emptyok=""true"" value="""&rs("zuozhe")&"""/><br/>")



if saytk>1 then
Response.Write "<input type=""submit"" value=""确定发布""/></form><br/>"
else

Response.write "<anchor title=""确定发布"">确定发布"
	Response.write "<go href=""edit.asp?xyxy=111&amp;saytk="&saytk&"&amp;sid="&sid&"&amp;id="&id&""" 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/>--------------
<br/><a href="all.asp?saytk=<%=saytk%>&amp;sid=<%=sid%>">[所有短信]</a>
<br/><a href="index.asp?saytk=<%=saytk%>&amp;sid=<%=sid%>">[短信管理]</a>

<br/><a href="../index.asp?saytk=<%=saytk%>&amp;sid=<%=sid%>">[后台管理]</a>
<%rs.close
conn.close
Call headsay()
%>
