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

Call head()
Call saycardd("WAP2.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")
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=1
else
if nums>10 then
nums=10
end if
end if
if saytk=1 then response.redirect"file.asp?bbsid="&bbsid&"&sid="&sid&"&saytk=2&tid="&tid&"&up="&up&""
'if Action<>"ok" then



if up=3 then
if tid<>"" then
dim wap_888cj_cn,rsp,rso,fiid
set rsp=Server.CreateObject("ADODB.Recordset")
rsp.open"select wap_888cj_cn,id from Users where sid='"&RequestStr(sid)&"'",conn,1,1
myid=rsp("id")
wap_888cj_cn=rsp("wap_888cj_cn")
rsp.close
set rsp=nothing
set rso=Server.CreateObject("ADODB.Recordset")
set rso=Server.CreateObject("ADODB.Recordset")
rso.open"select fid from sell where id="&tid,conn,1,1
fiid=rso("fid")
rso.close
set rso=nothing
if myid<>fiid and keys<>1 And keys<>3  And keys<>2 then
Response.write "很抱歉！您没有权限进行操作！！如果您是管理员或者该版斑竹，请联系ID1认证您的管理权限！"
 Response.Write "<br/><a href='topic.asp?tid="&tid&"&amp;bbsid="&bbsid&"&amp;sid="&sid&"&amp;saytk="&saytk&"'>返回本版</a><br/>"
Call head1()
 response.end
end if
end if
end if
%>
<form name="form2" method="post" action="file.asp?sid=<%=sid%>&amp;up=<%=up%>&amp;tid=<%=tid%>&amp;bbsid=<%=bbsid%>&amp;Action=ok&amp;saytk=<%=saytk%>">
如果想同时输入N个数据，请设置数据的数目(最多10条)：<br/>
<input name="nums" type="text" id="nums2" size="10">
<input type="submit" name="Submit" value="提交">
</form><br/>
<hr>


<%
response.write("<form action='WAP2_Upfile.asp?sid="&sid&"&amp;tid="&tid&"&amp;bbsid="&bbsid&"&amp;up="&up&"&amp;saytk="&saytk&"' enctype='multipart/form-data' method='post'>")
if up=2 then%>
回复内容:<textarea name="content" cols="15" rows="3"></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;sid="&sid&"&amp;saytk="&saytk&"'>返回本版</a><br/>"
Call head1()
 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;sid="&sid&"&amp;saytk="&saytk&"'>返回本版</a><br/>"
Call head1()
  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;sid="&sid&"&amp;saytk="&saytk&"'>返回本版</a><br/>"
Call head1()
  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="15"><%=Content%></textarea><br/>

<%else%>
帖子标题:<input type="text" name="name" maxlength="30"><br/> 
帖子内容:<textarea name="content" cols="15" rows="15"></textarea><br/>
<%end if%>
<hr>
<%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/>
<hr>
1.建议所上传文件名和目录组合是字母与数字.
<br/>2.上传的文件如果是图片则自动存放在相册中.
<br/>3.如果想帖子内容分页请用||隔开.<br/>
<%if tid<>"" then%>
<a href='topic.asp?sid=<%=sid%>&amp;tid=<%=tid%>&amp;saytk=<%=saytk%>'>查看主帖</a><br/>
<%end if
%>
<a href='board.asp?sid=<%=sid%>&amp;bbsid=<%=bbsid%>&amp;saytk=<%=saytk%>'>返回本版</a><br/><a href='index.asp?sid=<%=sid%>&amp;saytk=<%=saytk%>'>社区首页</a><hr>
<%Call head1()%>