<% data_path="../" 'ACC连接数据库路径，对SQL无效 %>
<!--#include file="../conn/conn.asp"-->
<!--#include file="../inc/safe.asp"-->
<!--#include file="../inc/filesystem.asp"-->
<%

	 if issession=0 then
	 if Replace_Text(request.Cookies("Yxmemberid"))="" then
		response.Write("请登录后再使用本功能！")
		response.end
    end if
	username=Replace_Text(request.Cookies("Yxmember"))
	gsid=Replace_Text(request.Cookies("Yxmemberid"))
	else
	 if session("id")="" then
		response.Write("请登录后再使用本功能！")
		response.end
    end if
	username=session("user")
	gsid=session("id")
	end if
	
  		wjname=Replace_Text(Request("wjname"))
             picture=Replace_Text(Request("picture"))
		set fso=YXFSO
		If fso.fileExists(server.mappath(HOPE_InstallDir&"Vipcom/"&username&"/"&picture)) Then
 		
 			Set rsuc = Server.CreateObject("ADODB.Recordset")
				rsuc.Open "SELECT * FROM [Websen_files]",Conn,1,3
					rsuc.addnew
					rsuc("wjname")=wjname
 					rsuc("fileurl")=picture
					rsuc("check")=1
					rsuc("userid")=gsid
					rsuc("addtime")=now()
					rsuc.update
				rsuc.close
				set rsuc=nothing
				Conn.Close
				set Conn=nothing
 
	 response.Redirect("myfiles.asp?msg=上传成功！")
	 else
	 
	 response.Write("<script>alert('请输入正确的图片路径地址！');location.href='myfiles.asp';</script>")
          response.End()
		  		end if

 %>
 

