<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../Include/connect.asp" -->
<!--#Include File="../antisqlin/Neeao_SqlIn.Asp"-->
<%
topic=request.form("topic")
username=session("Username")
ttgroup=request.form("ttgroup")
ttsysgroup=request.form("ttsysgroup")
content=request.form("content")
filename=request.form("filename")

Set fs = Server.CreateObject("Scripting.FileSystemObject")
On Error Resume Next
fs.CreateFolder("E:\Wwwroot\show5netnew\UserTT\"&username&"")
SFile = Server.MapPath("image/"&filename&"")
NFile = "E:\Wwwroot\show5netnew\UserTT\"&username&"\"&filename&""
on Error Resume Next
fs.MoveFile SFile, NFile

'信息入库
set rs = server.CreateObject("adodb.recordset")
sql="select * from Show5_ALLTT where TTID is null"
rs.open sql,cn,1,3
rs.addnew
rs("Topic")=topic
rs("Username")=username
rs("GroupID")=ttgroup
rs("Content")=content
rs("Filename")=filename
rs.update
rs.close
set rs=nothing

set rs = server.CreateObject("adodb.recordset")
sql="select * from Show5_TTSysGroup where GroupID="&request.form("ttsysgroup")&""
rs.open sql,cn,1,3
rs("TTNum")=rs("TTNum")+1
rs.update
rs.close
set rs=nothing
Response.write("<script>alert('拍贴已成功保存！');window.location.replace('../Hompy/ttlist.asp?username="&session("username")&"');</script>")
Response.End()
%>