<!--#include file="../inc/Inc.asp"-->
<!--#include file="ydzqpass.asp"-->

<%
call ling()
call head
call saycardd("2.0发帖")
Response.Expires = -1
Response.AddHeader "Pragma", "no-cache"
Response.AddHeader "Cache-Control", "no-cache, must-revalidate"
%>
<%dim tid,bbsid,up
bbsid=request.querystring("bbsid")
vvs=request.querystring("vvs")
if vvs=1 then vs=1
tid=request.querystring("tid")
up=request.querystring("up")
if up="" or IsNumeric(up)=False then up=0
up=abs(up)
dim nums
nums=request("nums")
if nums="" or IsNumeric(nums)=False then
nums=0
else
if nums>10 then
nums=10
end if
end if

'if Action<>"ok" then
%>
<%
if vs=>"" then
vs=vs
else
vs=vvs
end if
response.write("<form action='WAP2_Upfile.asp?saytk="&saytk&"&amp;sid="&sid&"&amp;vs="&vs&"&amp;tid="&tid&"&amp;bbsid="&bbsid&"&amp;up="&up&"' enctype='multipart/form-data' method='post'>")
if up=2 then%>
回复内容:<textarea name="content" cols="15" rows="5"></textarea><br/>
<%elseif up=3 then
if tid="" or Isnumeric(tid)=False then
 Response.write "ID无效！<br/>"
 Response.Write "<a href='topic.asp?tid="&tid&"&amp;bbsid="&bbsid&"&amp;saytk="&saytk&"&amp;sid="&sid&"&amp;vs="&vs&"'>返回本版</a><br/>"
 Response.Write "========"
 response.end
 End if
if bbsid="" or IsNumeric(bbsid) = False then
  Response.write "ID错误！"
 Response.Write "<a href='topic.asp?tid="&tid&"&amp;bbsid="&bbsid&"&amp;saytk="&saytk&"&amp;sid="&sid&"&amp;vs="&vs&"'>返回本版</a><br/>"
  Response.write "========"
  Response.end
end if
dim title,Content
set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select name,txt from sell where id="&tid,conn,1,1
if rs.eof then
  Response.write "帖子不存在！"
 Response.Write "<a href='topic.asp?tid="&tid&"&amp;bbsid="&bbsid&"&amp;saytk="&saytk&"&amp;sid="&sid&"&amp;vs="&vs&"'>返回本版</a><br/>"
  Response.write "========"
  Response.end
end if
title=rs("name")
Content=rs("txt")
Content=replace(content,"sid=@@sid@@","sid=sid")
rs.close
set rs=nothing
conn.close
set conn=nothing%>
帖子标题:<input type="text" name="name" maxlength="30" value="<%=title%>"><br/> 
帖子内容:<textarea name="content" cols="15" rows="3"><%=Content%></textarea><br/>
<%else%>
帖子标题:<input type="text" name="name" maxlength="30"><br/> 
帖子内容:<textarea name="content" cols="15" rows="15"></textarea><br/>
<%end if%>
<%for i=1 to nums %>
选择文件<%=i%>:<input type="file" name="filefield1<%=i%>" size="15"/><br/> 
文件内容<%=i%>:<textarea name="content<%=i%>" cols="15" rows="3"></textarea><br/><br/>  
<%next%>
<input type="submit" name="Submit2" value="确定上传"></form><br/>
<br/><br/>1.建议所上传文件名和目录组合是字母与数字.
<br/>2.上传的文件如果是图片则自动存放在相册中.
<br/>3.如果想帖子内容分页请用||隔开.<br/>
<%if tid<>"" then%>
<a href='topic.asp?sid=<%=sid%>&amp;vs=<%=vs%>&amp;tid=<%=tid%>'>查看主帖</a><br/>
<%end if%>
<a href='board.asp?sid=<%=sid%>&amp;vs=<%=vs%>&amp;bbsid=<%=bbsid%>'>返回本版</a><br/><a href='index.asp?sid=<%=sid%>&amp;vs=<%=vs%>'>社区首页</a>

<%
call headsay()
%>