<!--#include file="../inc/Secure.htm"-->
<!--#include file="../inc/inc_AspUpload.htm"-->
<!--#include file="../inc/conn.htm"-->
<%
ID=trim(request.QueryString("ID"))
if ID="" then response.end

dim strFileName, Personalpath
Personalpath="../File_up/Photo/"&ID
FileUpload Personalpath
arrFileName=split(strFileName,",")
strPhoto=""
for i=0 to ubound(arrFileName)
if arrFileName(i)<>"" and len(arrFileName(i))>4 then
strPhoto=arrFileName(i)
exit for
end if
next

Updateme(ID)

%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="../css/main.css">	 
<%
response.write "<script language=javascript>"
response.write "self.opener.location.href='Main.htm?SelectID="&ID&"'"
response.write "</script>"
%>
</head>
<body BGCOLOR="FFFFFF" onload="window.close();">
</body>
</html>
<%

sub Updateme(ID)
if strPhoto<>"" then
	sql="Update tblUser set Photo='"&strPhoto&"' where ID="& ID
end if
	oConn.execute (sql)
end sub

Function GetTableValue(TableName,Field,ValueField,Value)
	if TableName<>"" and Value<>"" then
		Set RsTmp = Server.Createobject("Adodb.recordset")
		strSql = "Select "& Field &" from "& TableName &" where "& ValueField &"='"& Value &"'"
		Rstmp.open strSql,oConn,1,1
		If not Rstmp.eof then
			GetTableValue=trim(Rstmp(Field))
		else
			GetTableValue=""
		end if
		Rstmp.close
		'set RsTmp = Nothing
	else
		GetTableValue=""
	end if
End Function
%>
<!--#include file="../inc/conn_close.htm"-->
