<!--#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 jiudian"
                 rs.open sql,connsms,3,3
                 rs.addnew
                 rs("name")=about
                 rs("address")=logo
				 rs("tel")=txt
				 rs("fid")=myid
				 rs("level")=yfmd
				 rs("time")=Now()
                 rs.update
                 rs.close
                response.write "添加成功<br/>"


		
Else

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 "添加到的类别:"
%>
<br/><select name="yfmd">
<option value="成人|夫妻|男女">成人|夫妻|男女</option>
<option value="综合|家庭|校园">综合|家庭|校园</option>
<option value="电脑|军事|政治">电脑|军事|政治</option>
<option value="艺术|体育|文化">艺术|体育|文化</option>
<option value="经营|宗教|古代">经营|宗教|古代</option>
<option value="交通|名人|儿童">交通|名人|儿童</option>
<option value="愚人|鬼话|民间">愚人|鬼话|民间</option>
<option value="爆笑网文">爆笑网文</option>
</select><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/>--------------<br/><a href="index.asp?saytk=<%=saytk%>&amp;sid=<%=sid%>">[笑话管理]</a>
<br/><a href="../index.asp?saytk=<%=saytk%>&amp;sid=<%=sid%>">[后台管理]</a>
<%
Call headsay()
%>
