<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../Include/connect.asp" -->
<%
videosysgroup=request.form("videosysgroup")
topic=request.form("topic")
username=session("username")
content=request.form("content")
filename=request.form("filename")
filename_f=request.form("filename_f")

Set fs = Server.CreateObject("Scripting.FileSystemObject")
On Error Resume Next
fs.CreateFolder("F:\UserVideo\"&username&"")
SFile = Server.MapPath("../UploadVideo_temp/"&filename_f&"")
NFile = "F:\UserVideo\"&username&"\"&filename_f&""
on Error Resume Next
fs.MoveFile SFile, NFile
fs.close
set fs=nothing

set rs = server.CreateObject("adodb.recordset")
sql="select * from Show5_ALLVideo where VideoID is null"
rs.open sql,cn,1,3
rs.addnew
rs("Topic")=topic
rs("Username")=username
rs("SysGroupID")=videosysgroup
rs("GroupID")=1
rs("Content")=content
rs("Filename")=filename
rs("Filename_f")=filename_f
rs("Type")=2
rs("Audit")=2
rs("Server")="v1"
rs.update
rs.close
set rs=nothing

set rs = server.CreateObject("adodb.recordset")
sql="select * from Show5_VideoSysGroup where GroupID="&videosysgroup&""
rs.open sql,cn,1,3
rs("VideoNum")=rs("VideoNum")+1
rs.update
rs.close
set rs=nothing
Response.write("<script>alert('视频已成功上传，管理员将在24小时内审核！\n审核后视频将发布在您的宅基地中！');window.location.replace('videolist.asp?username="&username&"');</script>")
Response.End()
%>