<% dim username dim abgcolor dim bbsurl bbsurl=getservepath(request.ServerVariables("server_name")&request.ServerVariables("URL")) stats="论坛文件展示" call nav() if Cint(GroupSetting(49))=0 then Errmsg=Errmsg+"
"+"
  • 您没有浏览本论坛展区的权限,请登陆或者同管理员联系。" founderr=true end if if founderr=true then call head_var(2,0,"","") call dvbbs_error() else if request("boardid")<>"" and isnumeric(request("boardid")) then if clng(request("boardid"))<>0 then call head_var(1,BoardDepth,0,0) else call head_var(2,0,"","") end if else call head_var(2,0,"","") end if if request("action")="send" then call card() elseif request("action")="save" then call cardsave() elseif request("action")="cards" then call showcard() else call main() end if if founderr then call dvbbs_error() end if call activeonline() call footer() sub main() dim sid dim F_ID, F_AnnounceID, F_BoardID, F_UserID ,F_Username, F_Filename, F_FileType, F_Type, F_FileSize, F_Readme, F_DownNum, F_ViewNum, F_DownUser, F_Flag, F_AddTime dim F_typename dim golist,showfile if request("id")="" or not isnumeric(request("id")) then Errmsg=Errmsg+"
    "+"
  • 您还未有选择展示的文件。" founderr=true exit sub else sid=clng(request("id")) end if %> <% set rs=conn.execute("select F_ID, F_AnnounceID, F_BoardID, F_UserID ,F_Username, F_Filename, F_FileType, F_Type ,F_FileSize, F_Readme, F_DownNum, F_ViewNum, F_DownUser, F_Flag, F_AddTime from [DV_Upfile] where F_ID="&sid) if rs.eof and rs.bof then response.write""&_ ""&_ "" else conn.execute("update [DV_Upfile] set F_ViewNum=F_ViewNum+1 where F_ID="&sid) F_ID=rs(0) F_AnnounceID=rs(1) F_BoardID=rs(2) F_UserID=rs(3) F_Username=htmlencode(rs(4)) F_Filename=rs(5) F_FileType=rs(6) F_Type=rs(7) F_FileSize=rs(8) if rs(9)<>"" or not isnull(rs(9)) then F_Readme=Server.htmlencode(rs(9)) else F_Readme="未有注明" end if F_DownNum=rs(10) F_ViewNum=rs(11) F_DownUser=rs(12) F_Flag=rs(13) F_AddTime =rs(14) if instr(F_Filename,"/")=0 then '判断文件是否本论坛,若不是则采用表中的记录. F_Filename=bbsurl&"UploadFile/"&F_Filename end if if not isnull(F_AnnounceID) then F_AnnounceID=split(F_AnnounceID,"|") golist="论坛相关帖子......[参与评论]" else golist="暂没有相关帖子" end if select case F_Type case 1 F_typename="图片集" showfile="按此在新窗口浏览图片screen.width-333)this.width=screen.width-333"">" 'showfile="[IMG]"&htmlencode(FilterJS(F_Filename))&"[/IMG]" 'showfile=dvbcode(showfile,UserGroupID,3) case 2 F_typename="FLASH集" showfile="[flash=500,350]"&htmlencode(FilterJS(F_Filename))&"[/flash]" showfile=dvbcode(showfile,UserGroupID,3) case 3 F_typename="音乐集" showfile=""&htmlencode(FilterJS(F_Filename))&"" case 4 F_typename="电影集" showfile=""&htmlencode(FilterJS(F_Filename))&"" case else F_typename="文件集" showfile="[upload="&F_FileType&"]viewfile.asp?ID="&F_ID&"[/upload]" showfile=dvbcode(showfile,UserGroupID,3) end select dim edit edit=false if GroupSetting(48)=1 then if master or superboardmaster or boardmaster then edit=true elseif F_Username=membername then edit=true else edit=false end if end if response.write""&_ " <% end if rs.close set rs=nothing response.write"
    <%=stats%>
    所查看的文件已被删除或禁止展示!
    感谢会员:"&F_Username&" 提供"&_ "
    "&_ "
    "&showfile&"
    " if founduser then response.write ""&_ "
    " if edit=true then response.write"" response.write" " end if response.write"
    " end if %>
    <%if F_Type=0 then%> <%end if%>
    作者: ><%=F_Username%>
    类别:<%=F_typename%>
    大小:<%=F_FileSize%> Byte
    浏览:><%=F_ViewNum%> 次
    下载:<%=F_DownNum%> 次
    创建时间:<%=F_AddTime%>
    相关帖子:<%=golist%>
    说明:<%=F_Readme%>
    " end sub '编写贺卡内容 sub card() stats="编写贺卡" dim sid,showfile dim F_Filename,F_Type dim frs if not founduser then errmsg=errmsg+"
    "+"
  • 您没有登录,不能编写贺卡。" founderr=true exit sub end if if request("id")="" or not isnumeric(request("id")) then Errmsg=Errmsg+"
    "+"
  • 您还未有选择展示的文件。" founderr=true exit sub else sid=clng(request("id")) end if %> <% set rs=conn.execute("select F_ID,F_Username, F_Filename, F_FileType, F_Type, F_Readme, F_ViewNum, F_Flag from [DV_Upfile] where F_ID="&sid) if rs.eof and rs.bof then response.write""&_ ""&_ "" else F_Filename=htmlencode(FilterJS(rs(2))) if instr(F_Filename,"/")=0 then '判断文件是否本论坛,若不是则采用表中的记录. F_Filename=bbsurl&"UploadFile/"&F_Filename end if F_Type=cint(rs(4)) select case F_Type case 1 showfile="按此在新窗口浏览图片screen.width-333)this.width=screen.width-333"">" 'showfile="[IMG]"&F_Filename&"[/IMG]" 'showfile=dvbcode(showfile,UserGroupID,3) case 2 showfile="[flash=500,350]"&F_Filename&"[/flash]" showfile=dvbcode(showfile,UserGroupID,3) case else Errmsg=Errmsg+"
    "+"
  • 该文件目前不支持发送。" founderr=true exit sub end select %>
  • <% rs.close set rs=nothing response.write"
    <%=stats%>
    所查看的文件已被删除或禁止展示!
    ::您要发送的文件::

    <%=showfile%>
    主题:
    收卡人:
    UBB功能:
    附言:
    ">
    " end sub '=====================贺卡演示==================== sub showcard() stats="欣赏贺卡" dim cid,msnid dim sender,incept,body,title,sendtime dim F_Filename,ftype,flag dim showfile if request("id")="" or not isnumeric(request("id")) then Errmsg=Errmsg+"
    "+"
  • 您还未有选择展示的文件。" founderr=true exit sub else cid=clng(request("id")) end if if request("msmid")="" or not isnumeric(request("msmid")) then Errmsg=Errmsg+"
    "+"
  • 您还未有选择展示的文件。" founderr=true exit sub else msnid=clng(request("msmid")) end if '取出短信内容 set rs=conn.execute("select sender,incept,title,content,sendtime from message where id="&msnid&" order by id desc") if not (rs.eof and rs.bof) then sender=htmlencode(trim(rs(0))) incept=htmlencode(trim(rs(1))) title=htmlencode(rs(2)) body=rs(3) sendtime=rs(4) else Errmsg=Errmsg+"
    "+"
  • 贺卡信息已不存在。" founderr=true exit sub end if set rs=nothing '取出文件内容 set rs=conn.execute("select F_Filename,F_Type,F_Flag from [DV_Upfile] where F_ID="&cid&" order by F_ID desc") if not (rs.eof and rs.bof) then F_Filename=rs(0) ftype=cint(rs(1)) flag=rs(2) if flag<>3 then Errmsg=Errmsg+"
    "+"
  • 您选择的并非贺卡文件。" founderr=true exit sub end if else Errmsg=Errmsg+"
    "+"
  • 贺卡文件已不存在。" founderr=true exit sub end if set rs=nothing if instr(F_Filename,"/")=0 then '判断文件是否本论坛,若不是则采用表中的记录. F_Filename=bbsurl&"UploadFile/"&F_Filename end if select case ftype case 1 showfile="按此在新窗口浏览图片screen.width-333)this.width=screen.width-333"">" 'showfile="[IMG]"&htmlencode(FilterJS(F_Filename))&"[/IMG]" 'showfile=dvbcode(showfile,UserGroupID,3) case 2 showfile="[flash=500,350]"&htmlencode(FilterJS(F_Filename))&"[/flash]" showfile=dvbcode(showfile,UserGroupID,3) case 3 showfile=""&htmlencode(FilterJS(F_Filename))&"" case 4 F_typename="电影集" showfile=""&htmlencode(FilterJS(F_Filename))&"" case else showfile="[upload="&F_FileType&"]viewfile.asp?ID="&F_ID&"[/upload]" showfile=dvbcode(showfile,UserGroupID,3) end select %>
    <%=stats%>
     <%=sendtime%>,由 <%=sender%> 送给 <%=incept%> 的贺卡
    标题:<%=title%>

    <%=showfile%>
    To:<%=incept%>
    <%=dvbcode(body,UserGroupID,3)%>
    From:<%=sender%>
    <%=sendtime%>
    <% end sub '============================保存贺卡信息===================== sub cardsave() if not founduser then errmsg=errmsg+"
    "+"
  • 您没有登录。" founderr=true exit sub end if dim cid,sname,rname,ctitle,body dim msmid,cardurl,msmbody cid=checkStr(trim(request.form("saveid"))) sname=checkStr(trim(request.form("sname"))) rname=checkStr(trim(request.form("rname"))) ctitle=checkStr(trim(request.form("title"))) body=checkStr(trim(request.form("Content"))) if cid="" or not isnumeric(cid) then Errmsg=Errmsg+"
    "+"
  • 您还未有选择展示的文件。" founderr=true exit sub end if if not (isnull(session("lastpost")) or boardmaster or master or superboardmaster) then if DateDiff("s",session("lastpost"),Now())<10 then ErrMsg=ErrMsg+"
    "+"
  • 本论坛限制发贴距离时间为10秒,请稍后再发。" FoundErr=True exit sub end if end if if chkpost=false then ErrMsg=ErrMsg+"
    "+"
  • 您提交的数据不合法,请不要从外部提交发言。" FoundErr=True exit sub end if if rname="" then ErrMsg=ErrMsg+"
    "+"
  • 请输入接受卡人姓名。" FoundErr=True exit sub else rname=split(rname,",") end if if ctitle="" then FoundErr=True ErrMsg=ErrMsg+"
    "+"
  • 贺卡的主题不应为空。" exit sub elseif strLength(ctitle)>50 then FoundErr=True ErrMsg=ErrMsg+"
    "+"
  • 贺卡主题长度不能超过50" exit sub end if if strLength(body)>15360 then ErrMsg=ErrMsg+"
    "+"
  • 附言不得大于 15KB" FoundErr=true exit sub end if if body="" then ErrMsg=ErrMsg+"
    "+"
  • 没有填写附言。" FoundErr=true exit sub end if for i=0 to ubound(rname) sql="select username from [user] where username='"&replace(rname(i),"'","")&"'" set rs=conn.execute(sql) if rs.eof and rs.bof then founderr=true errmsg=errmsg+"
    "+"
  • 论坛没有这个用户,看看你的发送对象写对了吗?" exit sub exit for end if set rs=nothing '插入短信并获得ID sql="insert into message (incept,sender,title,content,sendtime,flag,issend) values ('"&rname(i)&"','"&membername&"','"&ctitle&"','"&body&"',Now(),0,1)" conn.execute(sql) set rs=conn.execute("select top 1 id from message order by id desc") msmid=rs(0) set rs=nothing cardurl=bbsurl&"fileshow.asp?action=cards&id="&cid&"&msmid="&msmid&"" cardurl="[URL="&cardurl&"]点击欣赏贺卡[/URL]" msmbody=body+chr(13)+chr(13)+chr(10)+chr(10)+chr(10)+cardurl conn.execute("update [message] set content='"&checkStr(msmbody)&"' where id="&msmid&" ") conn.execute("update [DV_Upfile] set F_Flag=3 where F_ID="&cid&" ") if i>Cint(GroupSetting(33))-1 then errmsg=errmsg+"
    "+"
  • 最多只能发送给"&GroupSetting(33)&"个用户,您的名单"&GroupSetting(33)&"位以后的请重新发送" founderr=true exit sub exit for end if cardurl="" next sucmsg=sucmsg+"
    "+"
  • 恭喜您,发送短信息成功。。" session("lastpost")=Now() 'response.write cid&"|"&sname&"|"&rname&"|"&ctitle&"|"&body call dvbbs_suc() end sub function getservepath(str) dim tmpstr tmpstr=split(str,"/") getservepath="http://"&replace(str, tmpstr(ubound(tmpstr)), "") end function %>